No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
hi all, i want to run a while (some condition holds) loop, and each time it is executed create a variable, a different one. my problem is: how do i get them to have different names, in particular, ongoing ones like "entry1", "entry2",... can i have like a counting integer … |
|
hi, i want to have a vector of strings. i know i could declare it by [code] #include <iostream> #include <string> using namespace std; vector<string> vec; vec.push_back("this"); vec.push_back("is"); vec.push_back("my"); vec.push_back("array"); [/code] but thats very tedious. isnt there a more elegant way? if i had the vector as an argument to … |
|
hi all, i tried this code, but it doesnt work, it says vector subscript out of range: (sorry, i just dont understand how to correctly post code, if someone could tell me, please?) #include <iostream> #include <vector> using namespace std; vector<int> v; v.push_back(1); v.push_back(2); if (2 < v.size() && v[2] … |
|
hi all, ive got this problem, i think it is an interplay of ifstream and vector... the following code compiles and links without problem, but when i debug i get the message "expression: vector subscript out of range". i know that "out of range" means i am trying to access … |