Solved

how do i display subscript

Posted on 2008-11-02
3
441 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

914 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now