Files
seer/tests/hellostruct/hellostruct.cpp
T
2022-08-04 19:51:15 -05:00

27 lines
517 B
C++

#include <string>
#include <iostream>
#include <string.h>
struct Person {
char name[50];
std::string city;
int age;
float salary;
};
int main (int argc, char** argv) {
Person me;
strcpy(me.name, "Ernie Pasveer");
me.city = "Houston";
me.age = 60;
me.salary = 0.25;
std::cout << "'" << me.name << "', from '" << me.city << "', is " << me.age << " years old and makes " << me.salary << " per year." << std::endl;
return 0;
}