Solved

how do i display subscript

Posted on 2008-11-02
3
443 Views
Last Modified: 2012-05-05
i want to cout << "X1, Y1, Z1";
Due to the system I cannot display the desired result. All the 1s beside X,Y and Z are subscripts.

How do i do this in c++?
0
Comment
Question by:dandeliondream
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 31

Expert Comment

by:Zoppo
ID: 22860844
Hi dandeliondream,

what do you mean with 'subscripts'? Do you mean these three are arrays? If so you can output them like this:

cout << X[1] << ", " << Y[1] << ", " << Z[1];

Hope that helps,

ZOPPO
0
 
LVL 53

Accepted Solution

by:
Infinity08 earned 250 total points
ID: 22860848
The (extended) ASCII table doesn't have any subscript characters.

Unicode does though (subscript 1 is U+2081 for example) :

        http://www.unicode.org/charts/PDF/U2070.pdf

Can you use Unicode ?
0
 
LVL 3

Author Comment

by:dandeliondream
ID: 22861638
Hi Infinity08,
hmmm...i'm unsure if i can use unicode. i'll check with my lecturer. Thanks for the info
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Lambda for random numbers problem 7 120
Compile GLUT with Visual Studio 2015 1 204
Header of docx file 17 129
what type of pointer is this pointer? 3 22
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question