well i think i got what i wanted now. not the prettiest thing in the world.
string str;stringstream out;short myArray = new short[10];for(int i = 0; i < 10; i++){ myArray = i * 10; out << myArray; str = out.str(); out.clear();}cout << "myArray: ";for(int i = 0; i < 10; i++) cout << myArray << " ";cout << endl << "string array: " << str << endl;
output:
Quote:
myArray: 0 10 20 30 40 50 60 70 80 90
string array: 0102030405060708090
looks like that worked fine. thanks all for the help. i guess i really didnt need the ostringstream stuff. i just needed to get the shorts into a string format, i guess in essence i was making it too hard.