To declare a string of 50 letters, you would want to say:
char string[50];
Ok thats pretty clear... But how can you declare a string of infinity letters????
~tare
This is a discussion on char within the C++ Programming forums, part of the General Programming Boards category; To declare a string of 50 letters, you would want to say: char string[50]; Ok thats pretty clear... But how ...
To declare a string of 50 letters, you would want to say:
char string[50];
Ok thats pretty clear... But how can you declare a string of infinity letters????
~tare
You don't have infinte memory, therefore you cannot have an infinitely long char array. I'd recommend using std::string in the <string> library, as it resizes when needed.
http://www.msoe.edu/eecs/ce/courseinfo/stl/string.htm