diff options
| author | pants <niklasjo2004@gmail.com> | 2026-09-21 14:17:03 -0700 |
|---|---|---|
| committer | pants <niklasjo2004@gmail.com> | 2026-09-21 14:17:03 -0700 |
| commit | 7b21727285e50b0b050c4ddd70d07542229c5366 (patch) | |
| tree | 5d369153c5df5b41f3750d25479a68f20169c8ff /cpp/structs.cpp | |
init
Diffstat (limited to 'cpp/structs.cpp')
| -rw-r--r-- | cpp/structs.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cpp/structs.cpp b/cpp/structs.cpp new file mode 100644 index 0000000..87be70c --- /dev/null +++ b/cpp/structs.cpp @@ -0,0 +1,19 @@ +#include <iostream> +#include <string> +using namespace std; + +struct dog { + int age; + int weight; + string color; + string name; +}; + +int main() { + dog atlas; + atlas.age = 7; + atlas.weight = 77; + atlas.color = "black"; + atlas.name = "Atlas"; + cout << atlas.color << endl; +} |
