what simple cin.ignore() do without any parameter

Let's find out.

http://www.cplusplus.com/reference/istream/istream/ignore/

So this function has default arguments. If you give no arguments, it's as if you gave

cin.ignore(1, EOF);

So it will take (and ignore) one character from the input sequence.

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.