int array1[size1],array2[size2],array3[size];
Not even a little bit. VLA are illegal in C++, and even if you're using g++'s extensions, you have to figure out what size1, size2, and size are...
Type: Posts; User: tabstop
int array1[size1],array2[size2],array3[size];
Not even a little bit. VLA are illegal in C++, and even if you're using g++'s extensions, you have to figure out what size1, size2, and size are...
'-' is the number 45 . Are you willing to give up the number 45 and use it instead as a "this spot is empty" marker? If so, then you're in.
Assuming you're on an ASCII machine, naturally.
I said something about negative numbers, yes. But I'll say it again, in italics this time: you cannot have empty spaces in an array. There will be a number in that place. If you want to think of...
Arrays can't have empty slots -- they will be filled with something. If you expect the users to not type negative numbers, you can use a negative value as a sort of "hey this number shouldn't be...