right, i'm having problems with something stupid involving input and arrays.
what do i put in that red area to output the correct number?Code:char number[256]; cout << "enter a number" << endl; cin.getline(number,256); cout << "the number is" << endl; for (int i = 0;i > ???;i++) { cout << number[i]; } cout << endl;
I know that if i put in 256, and if the number entered has less than 256 digits, then the program messes up. how can i figure out which units in the array are being used?
i know this system isn't the way numbers are usually handled, but i'm doing something different involving very large numbers.