By jok_rodz
on Wed, 03/27/2013 - 09:43
How can i make Dataset as Array in VideoPlayback.cpp?so that i can choose the specific dataset to activate
QCAR::DataSet* dataSetStonesAndChips = 0;
How can i make Dataset as Array in VideoPlayback.cpp?so that i can choose the specific dataset to activate
QCAR::DataSet* dataSetStonesAndChips = 0;
How to make DataSet as Array
Hi,
you could use an array of QCAR::DataSet pointers, or an std::vector of QCAR::DataSet pointers; both options are valid in principle;
please refer to the C++ programming guide:
http://www.cprogramming.com/
How to make DataSet as Array
How do i declare it in cpp? and how to initialize it as a (dynamic size)?
How to make DataSet as Array
If you need a dynamically resizable array, std::vector is probably the best option:
#include <vector>
std::vector<QCAR::DataSet*> myDataSetArray;
Adding a dataset is as simple as:
mDataSetArray.push_back( someDataSet );
How to make DataSet as Array
when i add #include<vector> in VideoPlayback.cpp
it said no such file or directory
How to make DataSet as Array
Oh, that's because you need to add STL support in your Application.mk file:
you need to add this line
How to make DataSet as Array
Thanks it work already .
How to make DataSet as Array
Good!