Skip to content

Instantly share code, notes, and snippets.

@lettergram
Created March 18, 2015 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lettergram/ef349e1945567e75ef20 to your computer and use it in GitHub Desktop.
Save lettergram/ef349e1945567e75ef20 to your computer and use it in GitHub Desktop.
Generate::Generate(){
objects = new std::queue<std::string>;
}
void Generate::push(std::string obj){
std::cout << "Size: " << objects->size() << std::endl;
std::cout << "Pushing:\n" << obj << std::endl;
objects->push(obj);
}
std::string Generate::pop(){
std::string obj = objects->front();
objects->pop();
return obj;
}
void Generate::outPut(){
std::cout << "creating!\n---------------------\n\n" << std::endl;
while(objects->size() > 0){
std::cout << this->pop() << std::endl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment