Hi!
It's me again :)
I have failed with my C++ code once again. This time it's with vectors.
string show_actions(){
vector<string> actions;
actions.push_back("end");
actions.push_back("hunt");
vector<string>::const_iterator iter;
cout <<"All of the possible actions are : " << endl;
for(iter = actions.begin(); iter != actions.end(); ++iter){
cout << *iter << endl;
}
}
There is supposed to be an error somewhere in that code. When I try to compile it prints out
end
hunt
Segmentation fault
If you know what to do, please let me know. I haven't got the slightest clue
If you need the rest of the code, it's located here. I don't think you will need to check it out though, because it compiles fine.
http://www.2shared.com/file/qtz5FEON/Lost_island.html
http://www.2shared.com/file/_0HuOq_j/island_func_mine_hunt.html
http://www.2shared.com/file/8K9sK3-4/island_func_hunt_rest.html
http://www.2shared.com/file/NIATZELS/island_func_build.html
Thanks!