Hi all,
I am trying to use the class as a vector and pass parameters to the class. In loop.run(), I do certain things, then I would like to delete all the elements of the class.
1 class SampleMarketDataClient
2 {
3 ....
4 };
5 int main()
6 {
7 vector<SampleMarketDataClient> clients;
8 while (!cin.eof())
9 {
10 if(cin.good())
11 {
12 cin >> lineString;
13 // Set up a market data subscription.
14 clients.push_back( SampleMarketDataClient(lineString) );
15 clients++;
16 }
17 }
18 loop.run();
19 clients.clear();
20 }
But this doesn't work. I think the line numbers 14, 15 & 19 are not the proper way to use the class as vectors. When I compile the program, I get errors. Is there a better way to do it? If so please let me know. Thanks a lot in advance.