How to make an exit from the loop input strings in a vector?

0 like 0 dislike
6 views
Tell me how can the function setSumm() to write output from input in a loop.
I only teach the pros.
private: vector name; }; void Summ::setSumm() { for (int i = 0; i < SIZE_VEC; ++i) { cout << i + 1 << "- "; string var; getline(cin, var); name.push_back(var); } }
by | 6 views

1 Answer

0 like 0 dislike
Operator break.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
3 answers
0 like 0 dislike
3 answers
110,608 questions
257,186 answers
0 comments
33,652 users