Hi,
When I want to get a string with getline function, it jumps from this statement without getting string . Because I get an integer number before it and the \n is pressed . To solving this problem I use cin >> ws before getting string with getline function . Now when I want to enter white spaces in beginning of string , this white spaces is ignored .
What can I do to solving this problem ?
Thanks ......
Behi Jon 0 Light Poster
twomers 408 Posting Virtuoso
sfuo 111 Practically a Master Poster
sfuo 111 Practically a Master Poster
Behi Jon 0 Light Poster
sfuo 111 Practically a Master Poster
Behi Jon 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.