Array

How to when I have a array that keeps me that number in some kind of variable. Number can be bigger that 9. Thank you.

cin:
4 // number of elements of array
6 10 0 3 //elements of array
cout:
61003
Show us what you've tried so far.
if you just want to print it rammed together, you can do that:
for(int x = 0; x < inputnum; x++)
cout<<array[x];
cout << endl;

if you want to actually cook up the value from pieces, its a little more complex.
the easy thing to do would be to cram the array elements into a string and then convert the string back to an integer. For that you need some form of atoi and stringstream.
I don't need help. I recognize where I was wrong.
Thank you.
Topic archived. No new replies allowed.