I have problems writing data to a text file. The program jumps over the name of the second, third....person, and I can't really figure out why. I have tried cin.ignore, but it doesn't work as I wish. Somebody that has an idea?
I do not see where you are writing data to a text file. But it is obvious that in your snip of code nothing will be read into pNr, The problem is that cin.getline( name, SIZE ) reads either SIZE-1 bytes or until new line character will not be encountered. And it does not read new line character. So next read operation sees that the next character is new line character and reads nothing. You should skip new line character after cin.getline( name, SIZE ).