coinjo wrote:
Can anyone please tell me how to take input from user of random length
and then display it?
Random length?
I presume that you mean they can use any number of characters, followed
by some kind of terminating character.
Take a look at
std::string, std::getline, std::cin and std::cout
from these headers:
<iostream>
<string>
That allows the user to enter a line (a string terminated with a
carriage return), read it into a string, and then display that string.
This should be described in your favourite C++ reference.
Ben Pope
--
I'm not just a number. To many, I'm known as a string...