Monday, May 24, 2010

If I am using cin<<x; (in C++) where x is char[20] then x takes value only before space. How 2 get full string

Firstly its cin%26gt;%26gt;


u'll also need the command getline()


Im not going to give everything away but u shld be able to figure it from here !

If I am using cin%26lt;%26lt;x; (in C++) where x is char[20] then x takes value only before space. How 2 get full string
First of all, it's cin %26gt;%26gt; x. cout %26lt;%26lt; goes to the left, cin to the right.





Second, use cin.getline to get a full string.

edible flowers

No comments:

Post a Comment