From a33d49ac4d1ce554c72770927957a089b4023bf1 Mon Sep 17 00:00:00 2001 From: pants Date: Mon, 21 Sep 2026 14:17:45 -0700 Subject: init --- cpp/structs.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cpp/structs.cpp (limited to 'cpp/structs.cpp') 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 +#include +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; +} -- cgit v1.2.3