hi, I need to obtain a vector of arrays;
Is this correct? thanks
Qt Code:
  1. GLfloat* position = new GLfloat[4];
  2. vector <GLfloat*> ppp;
  3. for (int g=0; g < ....; g++) {
  4. for (int i=0; i<4; i++) {
  5. position[i] = ch.toInt(); // split a string as "1543"
  6. }
  7.  
  8. ppp.push_back(position);
  9. }
  10.  
  11. for( std::vector<GLfloat*>::iterator i = ppp.begin(); i != ppp.end(); ++i ) {
  12. delete [] *i;
  13. }
  14. ppp.clear();
To copy to clipboard, switch view to plain text mode