struct Speaker
{
staticint numElem;
string name;
int number; // Phone
string topic;
float fee;
};
// IN main() FUNCTION
Speaker s[10];
The goal is for numElem to keep track of how many of the 10 elements are in use. However, I'm not sure the proper way to access the element, if it's even possible. Does anybody know if I can do this?
externint s ; // declaration
namespace A
{
externint s ; // declaration
}
struct B
{
staticint s ; // declaration
};
int s = 1 ; // definition
int A::s = 2 ; // definition
int B::s = 3 ; // definition