Quote:Original post by musafir2007
^^^ Thanks a lot man!! but can you please tell me a little bit more about.. string line(length, ch);?
thanks!!
Sure... it creates a string containing 'length' characters 'ch'.
So one of the constructors of a string is something like this:
string::string(int n, char ch);
Which means you can give two arguments, the first is the length of the string and the second is the character used to fill the string.