| View previous topic :: View next topic |
| Author |
Message |
Bizarro I post too much
Reputation: 0
Joined: 01 May 2007 Posts: 2648
|
Posted: Mon Dec 22, 2008 4:15 pm Post subject: [c++]sprintf |
|
|
it crashes me when i run the app and display % sign using sprintf
ie
| Code: | char buffer [260]={0};
int f=100;
sprintf(buffer,"EXP: %i % ",f);//code that gave error
//sprintf(buffer,"EXP: %i ",f);//code that worked
SetDlgItemText(mainwindow,IDC_STATIC_EXP,buffer);
|
any idea?
_________________
w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils |
|
| Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Mon Dec 22, 2008 4:21 pm Post subject: |
|
|
| I think you have to do %% to display %.
|
|
| Back to top |
|
 |
Bizarro I post too much
Reputation: 0
Joined: 01 May 2007 Posts: 2648
|
Posted: Mon Dec 22, 2008 4:53 pm Post subject: |
|
|
ty
_________________
w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils |
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
|
| Back to top |
|
 |
|