J
Jess
Hello,
Is it possible to put object references into a container, such as a
vector? I tried the following, but the compiler gave me lots of error
messages.
struct A{
int x;
};
int main(){
vector<A&> X;
A a;
X.push_back(a);
}
Thanks.
Jess
Is it possible to put object references into a container, such as a
vector? I tried the following, but the compiler gave me lots of error
messages.
struct A{
int x;
};
int main(){
vector<A&> X;
A a;
X.push_back(a);
}
Thanks.
Jess