Vector list
-
I am a new C++ video game design student. I'm really not loving this C++ class cause my teacher is from tiawan and only knows like 100 words of english and when he puts them together in a sentence they are in the wrong order anyways. So i'm NOT understanding what it is he is telling us or asking of us. But i need help, or i need the code written for me or something. but we are on vectors and he wants us to make a list using 'iterators' that we can input our favorite video games. list them, and erase them. then he wants a quit fucntion to end the program. can someone please help me.
-
I am a new C++ video game design student. I'm really not loving this C++ class cause my teacher is from tiawan and only knows like 100 words of english and when he puts them together in a sentence they are in the wrong order anyways. So i'm NOT understanding what it is he is telling us or asking of us. But i need help, or i need the code written for me or something. but we are on vectors and he wants us to make a list using 'iterators' that we can input our favorite video games. list them, and erase them. then he wants a quit fucntion to end the program. can someone please help me.
You should also learn to read sticky notes in forums. This forum is for C++/CLI questions only, your question is off topic here. It's generally rude to crosspost, in any case.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
I am a new C++ video game design student. I'm really not loving this C++ class cause my teacher is from tiawan and only knows like 100 words of english and when he puts them together in a sentence they are in the wrong order anyways. So i'm NOT understanding what it is he is telling us or asking of us. But i need help, or i need the code written for me or something. but we are on vectors and he wants us to make a list using 'iterators' that we can input our favorite video games. list them, and erase them. then he wants a quit fucntion to end the program. can someone please help me.
You are not clear, but it sounds like you want the Standard Template Library (STL) It a simple and easy to use library. here is a simple example for you, straight from the help files which you should probably read first before posting a question: #include "stdafx.h" #include using namespace std; int _tmain(int argc, _TCHAR* argv[]) { vector myVector; // an empty string vector vector::iterator myIter; // an iterator for the string vector myVector.push_back( 0 ); myVector.push_back( 1 ); myVector.push_back( 2 ); myVector.push_back( 3 ); myVector.push_back( 4 ); myVector.push_back( 5 ); for ( myIter = myVector.begin(); myIter != myVector.end(); myIter++ ) { cout << " " << *myIter << endl; } cout << endl; return 0; } OrcBighter2