Sign in to follow this  
dacypher

Missing ascii

Recommended Posts

dacypher    128
Sorry to keep asking such nOOb ?s, but the reason I asked the previous ascii question was because I needed ( what I at least believe to be )an ascii character. The one I was trying to get was not on the ascii list. It is used in this basic "Hello world" text. std::cout<< "Hello World" <<std::end It would be used right after end, before the ; . It is like a 㤠only the little side-part would be at the top ( I don't think the site is recognizing this one correctly. If not, it is ALT+180 ). Hmmm, is this supposed to be in the IDE? Thanks! P.S.- Sorry to ask this again, but I asked it at the very bottom of my last post, after I said thanks and all, I thought no one would see it. Thanks again! EDIT: NO, the site is not reading it correctly. You can hit ALT+180 to see what i mean. Thanks!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Hmm I think you already know the ascii code... 180 [grin]

Here if it makes you feel better [http://www.asciitable.com/]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Sorry I don't think I got your question right is this what you want to do?

char str[256];
sprintf(str,"Hello world%c\n",(char)180);
cout<<str;

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Hmmm, that is a different way then the book says. That way is probably better, but I still want to try the way the book says. The ascii looks like 180, but the side-bar is at the top of the vertical line, poiting left.Let me actually put in the whole code.

//Game Over
//A first C++ program

#include

int main()
{
std::cout << "Hellow World" < return 0;
}

NOTE: Substitute the "?" for the ascii I need. It won't work wuthout it I've found. Thanks!! =)

Share this post


Link to post
Share on other sites
Auron    328
Umm, you actually want std::endl; I don't think you can even use weird ascii characters like that in an identifier, which std::endl is. It just so happens that the font used in the book writes the letter l like that, probably to help distinguish it from other things.

BTW, just to make sure, it's the letter 'L' in lowercase (since lowercase L often looks like the number one...)

-Auron

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this