#include <iostream>
#include <string> // includes string object
usingnamespace std;
struct employee // employee up here
{
string name; // use string
string address; // use string
unsignedint age; // integer data type is called "int" not "integer"
}; //add a semicolon
int main() // use int main() for no parameter main function not "void main(void)"
{
employee thomas;
thomas.name = "thomas Lim";
thomas.address = "Singapore";
thomas.age = 15;
return 0; // main returns int, we return 0 by convention
}
For strings, you do char name[20]. Or you could use the string class. In my opinion, I reckon the string class is noob friendly. You can even use the [] brackets like in an array.