• Welcome to Valhalla Legends Archive.
 

placeholders

Started by vonLandenhausen, November 18, 2004, 01:29 PM

Previous topic - Next topic

vonLandenhausen

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

vonLandenhausen


UserLoser.

%s?


printf("Hello my name is %s!\n", mystring);

Mephisto

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.

Skywing

You could use %s/%ws with c_str() for most basic_strings...

vonLandenhausen

thx alot. does anyone know where to find a table with all the other placeholder variables? i was looking for that for 30min ¬_¬

Arta

I'm not usually so curt, but.. you really need to RTFM.

Skywing

Yes.  This is trivial to find if you look up printf in any reference manual.

MyndFyre

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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Banana fanna fo fanna

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.

Mephisto

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.

vonLandenhausen

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

dxoigmn

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.

vonLandenhausen

RTFM = Read the fucking manual

Zakath

Yes, we know. That's what we've been subtly (and not-so-subtly) trying to get you to do.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.