O
oceanx
Hi everybody,
the "insert" function of a vector copies the param? or just refers to
the structure?
for example:
typedef struct {
int a;
...
} structType;
void f ( vector <structType> & v){
stryctType xx;
xx.a = 10;
v.add (xx); // it really *copies* xx in v... isn't it?
}
int main(){
f (vect);
cout << vect[0].a;
}
it works, but... is it correct?
thanks,
Major
the "insert" function of a vector copies the param? or just refers to
the structure?
for example:
typedef struct {
int a;
...
} structType;
void f ( vector <structType> & v){
stryctType xx;
xx.a = 10;
v.add (xx); // it really *copies* xx in v... isn't it?
}
int main(){
f (vect);
cout << vect[0].a;
}
it works, but... is it correct?
thanks,
Major