I have vector<string> fruits where each element is a string of a fruit name. I want to take each element and concatenate into a string called fruitylicious (ex. "applebananastrawberry") When I do
1 2 3 4 5 6
vector <string> fruits; //I have a while loop that `cin`s strings to put into elements--this is working as expected
string fruitylicious = "";
for(int i=0;i<fruits.size();i++){
fruitylicious += fruits.at(i);
}
cout << fruitylicious << endl;
I get a bunch of errors on compilation (otherwise, the rest of the program compiles and behaves as expected if I comment this part out).
What's the problem?
I get a bunch of errors on compilation (otherwise, the rest of the program compiles and behaves as expected if I comment this part out).
What's the problem?
Wow, a single typo messed me up. I immediately disregarded the errors because there were several pages of it. Thank you and sorry for the stupid mistake.