string - how to execute an for loop till the queue is emptyin c++ -
i need execute loop till queue empty code
queue<string> q; for(int i=0;i<q.size(),i++) { // operation goes here // datas added queue }
while (!q.empty()) { std::string str = q.front(); // todo: str. q.pop(); }
Comments
Post a Comment