cin with 40 characters how to

I need to be able to read a line that's not bigger than 40 characters including the blank spaces. how to do it?

It's for names
Last edited on
Topic archived. No new replies allowed.