Hi,
I am really new with c++. I need to make some strings like "X00001", "X00002", ..... up to "X05000".
I feel this is really an easy task!
Can anybody please help me to do so?
Thanks
Hash
Hi,
I am really new with c++. I need to make some strings like "X00001", "X00002", ..... up to "X05000".
I feel this is really an easy task!
Can anybody please help me to do so?
Thanks
Hash
What you really need is a really good, free C++ book to download. Otherwise, you're going to be back every five minutes with another basic question. Your question indicates that you've done almost zero research on your own so far.
You can convert integers into strings with the help of stringstreams.
The I/O streams also have manipulators of which setfill and setw might be relevant to this task.
Basically, if you can print strings such as that with cout, you practically have the code that is needed to send them to strings instead of console output.
I might be wrong.
Quoted more than 1000 times (I hope).Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.