mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 16:40:42 +08:00
27 lines
517 B
C++
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;
|
||
|
|
}
|
||
|
|
|