New to C++ here. Lets say I have a struct defined as:
struct Item {
string name;
}
In C++, is there a way where I can get the value of name
by just calling the object?
Item item;
item.name = "Andy"
cout << item; // --> Output: "Andy"
Thanks!