for(int i=0;p[i]!=NULL;i++) for(int j=0;p[i][j]!=NULL;j++)
C++ (Qt)struct CBackTrack { CBackTrack( unsigned int tagID, QDataStream & stream ) : mStream(stream) { mStream << tagID; mSavedPos = mStream.device()->pos(); mStream << (int) 0; } ~CBackTrack( void ) { qint64 pos = mStream.device()->pos(); mStream.device()->seek(mSavedPos); mStream << unsigned int (pos - mSavedPos); mStream.device()->seek(pos); } QDataStream & mStream; qint64 mSavedPos;};
C++ (Qt)CBackTrack btArr('ARRA', stream);for(int i=0;p[i]!=NULL;i++) { CBackTrack btRow('ROW1', stream); for(int j=0;p[i][j]!=NULL;j++) ....}