Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

STL question ...

Status
Not open for further replies.

HadiRezaee

Technical User
Mar 9, 2001
165
IR
Hi all,
I want to use of vector or list continer for adding structure to array, how can i do that ?
For example:

struct myLib
{
.
.
.
} NNN;

vector<myLib> vec1;
vec1.push_back(...);

Is it true ?
 
struct myLib
{
.
.
.
} NNN;
NNN a,b,c;
vector<NNN> x;
x.puch_back(a);
x.puch_back(a);
x.puch_back(a);

or a kind of struct what you can use only in C++, not in C:

struct myLib
{
.
.
.
};
myLib a,b,c;
vector<myLib> vec1;
vec1.push_back(a);
vec1.push_back(b);
vec1.push_back(c);
John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top