+5  A: 

Your problem is here:

lineData.name = 1;
lineData.grade = 2;

I should note that the symbols you're getting are ASCII 1 (ie, exactly what you're setting lineData.name to).

while( getline(myFile, line) )

You need to take the line and parse it, inserting a proper string into lineData.name, and inserting an integer into lineData.grade.

Matthew Iselin
It's got nothing to do with null termination.
Noon Silk
I assumed from "faces" that there were multiple, one after the other. It would appear that's a bad assumption upon rereading the question, so I've edited the answer.
Matthew Iselin
Also, when I posted I was behind a proxy which was blocking the image. So I made do with the information I had.
Matthew Iselin
+6  A: 

The smiling face is the character with ASCII value 1. Not sure why, but apparently your compiler decided to treat it as a char, so you get the smiley.

Tal Pressman
The smiley face is not an ASCII character. It is in the IBM-PC (MS-DOS code page 437) set.
mark4o
+3  A: 

The string is being assigned a character value (1), which happens to be a smiley face in the ASCII character set.

Josh Matthews
+8  A: 

I WANT TO KNOW WHY IT IS GIVING ME SMILEY FACES INSTEAD OF ERRORS

Because the datatype is string, and the char 0x01 prints a smile-face. You possibly what to assign the value 0x31 instead, which is the character 1, in ASCII.

Noon Silk
Or the value `'1'`, which is a portable way of writing the character 1
MSalters
+2  A: 

Like others have said name is of type string, so it would be best to assign a string to it:

lineData.name = "1";

the inverted commas will let the compiler know that this value is a string, and you will stop getting smiley faces.

that said...

Coolest. Bug. Ever.

0xC0DEFACE