I am new to C++. Google didn't help out. Is there any way to show all member elements of a non user-defined struct? I understand I can always return to the documentation of the struct, but it would be nice if there is a function to which I can pass any struct and get a list of all elements in that struct viewed in the console. For example, how can I know the elements in the object myTm which is of type tm (tm is a struct) in the following code:
#include <ctime>
#include <iostream>
int main()
{
tm myTm; //tm is a struct that is included by <ctime>
return 0;
}