VarObj. Checkpoint.

This commit is contained in:
Ernie Pasveer
2022-09-01 19:17:11 -05:00
parent c16a23ca48
commit 6534a829c9
6 changed files with 241 additions and 13 deletions
+13 -6
View File
@@ -3,10 +3,15 @@
#include <string.h>
struct Cell {
unsigned int number;
};
struct Location {
std::string city;
std::string state;
int zip;
struct Cell* cell;
};
struct Person {
@@ -21,12 +26,14 @@ int main (int argc, char** argv) {
Person me;
me.name = "Pasveer, Ernie";
me.age = 60;
me.salary = 0.25;
me.location.city = "Houston";
me.location.state = "Texas";
me.location.zip = 77063;
me.name = "Pasveer, Ernie";
me.age = 60;
me.salary = 0.25;
me.location.city = "Houston";
me.location.state = "Texas";
me.location.zip = 77063;
me.location.cell = (Cell*)malloc(sizeof(Cell));
me.location.cell->number = 2813877580;
std::cout << "'" << me.name << "', from '" << me.location.city << "', is " << me.age << " years old and makes " << me.salary << " per year." << std::endl;