Hey everyone,
I'm trying to figure out how to convert from an Integer or a Double into a string.

I want a string variable to print out on a command line.

Thanks for any help.

- WolfShield

Why convert to string? If you want to print to terminal, just output it to cout, as in:

int i = 999;
cout << "i == " << dec << i << endl;

@rubberman

Thanks for the correction

Not a problem. We all get used to the goodies on our particular systems, often not considering if they are available elsewhere. After 30 years of serious cross-platform development (one code base, 10+ operating systems, 10M lines of code) I quickly learned that what works on one system, may either not work at all (not available), or function differently on another. It gets really fun when you are bit-twiddling and you switch from a big-endian to a little-endian (or vice versa) machine, or one where a long integer is 32 bits to one where it is 64 bits.

This article has been dead for over six months. Start a new discussion instead.