We can print elements of a structure using structure.element
. But I want to print a complete structure at once.
Is there a method something like cout<<strucutre
, the same way we can print a list or tuple in Python.
This is what I want:
struct node {
int next;
string data;
};
main()
{
node n;
cout<<n;
}