i know that %d is for interger, %X for hexadecimals and i think that %ld is for long integers. but what do i use for strings/CStrings ? i already searched with google but didnt getany help. btw, is "placeholder" the right word that stuff above ? help please
come on. im waiting :'(
%s?
printf("Hello my name is %s!\n", mystring);
Quote from: vonLandenhausen on November 18, 2004, 01:32 PM
come on. im waiting :'(
::)
%s - C-style NULL terminated strings
You cannot print std::string with cstdio; use iostream objects to do that.
You could use %s/%ws with c_str() for most basic_strings...
thx alot. does anyone know where to find a table with all the other placeholder variables? i was looking for that for 30min ¬_¬
I'm not usually so curt, but.. you really need to RTFM.
Yes. This is trivial to find if you look up printf in any reference manual.
Quote from: vonLandenhausen on November 18, 2004, 01:32 PM
come on. im waiting :'(
You also need to stop trolling. People will get to you when they can get to you.
1:29 - first post
1:32 - second post
I don't think I'm ever going to help you, and I hope no one else does, either.
Quote from: Banana fanna fo fanna on November 18, 2004, 06:26 PM
1:29 - first post
1:32 - second post
I don't think I'm ever going to help you, and I hope no one else does, either.
Same; I'm getting pretty fed up with him.
Quote from: Mephisto on November 18, 2004, 08:57 PM
Quote from: Banana fanna fo fanna on November 18, 2004, 06:26 PM
1:29 - first post
1:32 - second post
I don't think I'm ever going to help you, and I hope no one else does, either.
Same; I'm getting pretty fed up with him.
;D im not as elite as you guys are. but nobody is perfect k?
Quote from: Arta[vL] on November 18, 2004, 02:50 PM
I'm not usually so curt, but.. you really need to RTFM.
hey mate, i dont have a fucking manual for my vc++6 compiler :D
Quote from: vonLandenhausen on November 19, 2004, 04:03 AM
hey mate, i dont have a fucking manual for my vc++6 compiler :D
You don't need a manual for the compiler, rather a manual for the language. I'd recommend
The C Programming Language by Kernighan & Ritchie.
RTFM = Read the fucking manual
Yes, we know. That's what we've been subtly (and not-so-subtly) trying to get you to do.
Quote from: vonLandenhausen on November 19, 2004, 09:45 AM
RTFM = Read the fucking manual
So download one. What do expect us to do, spoonfeed you your program line by line?
manual == documentation, retard.