Wrong operator. Use << for ofstream, not >>.Code:outfile >> name; outfile >> "\n"; outfile >> age; outfile >> "\n"; outfile >> location; outfile >> "\n"; outfile >> birthplace;
There's no such thing as a char with unlimited length... nor is there a practical use for one. Oh, and try the code from my last post, I had copied the wrong code... it's fixed now.