I'd like to simply ask you about something i can't solve in the algorithm I'm designing. I'm asking a question that's purely learning. I searched both stackoverflow and Uncle Google, but I didn't see a logical solution.
struct MyStruct_1
{
int number[];
};
Imagine it's such a struct Or imagine that there are a few other things in it that aren't arrays.
struct MyStruct_2
{
int id;
string ModelName;
int number[];
};
**Insert ==>>> ID = 1 ModelName = "ModelA" number = { 6,7,8,9, 57 }
Insert ==>>> ID = 2 ModelName = "ModelB" number = { 3,17,9,28,8 }
*****************************************************************
Update/Delete ==>>> ID = 2 ModelName = "ModelB" number = { 9 }
Update/Delete ==>>> ID = 1 ModelName = "ModelA" number = { 57 }
*****************************************************************
Insert/Add ==>>> ID = ModelName = "ModelA" number = 103**
In this way, from a structure to a C++ language;
list<MyStruct> demoListe
when I create
My 1st question: how do we provide data entry? push_back ({ 9,3,65,2 }); I tried it, but I got an error message.
My 2nd question: Can the friend who answers the data to enter the data also sample reading the data?
I'd like to thank everyone who will help and lead me to the right solution.
Regards
std::vectorinstead.