Jump to content
  • Advertisement
Sign in to follow this  
dacypher

Missing ascii

This topic is 5102 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
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
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
Ahhhh, ok! Your right! I was wondering, and it's just that the code is in another font than the text of the book. Thanks!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!