k simple task that i cant figure out :P i have a string stream called 'CP' and all i wanna do is place it in a char[250] array so in other words i need a way of taking single characters from the string stream, any help would be great, thanx
k simple task that i cant figure out :P i have a string stream called 'CP' and all i wanna do is place it in a char[250] array so in other words i need a way of taking single characters from the string stream, any help would be great, thanx
its ok ive sorted it, just used memcopy and copied the complete string stream to a constant character array
This should work. Using memcpy is rather dangerous because the stringstream is an actual class, and you don't necessarily know where it actually stores the string relative to the start of the class' memory.
Code:stringstream ss( "this is a test" ); char x[250]; ss>>x;
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie