I've a std::vector<std::string> vec1 which has 8 elements (thanks push_back)
I've another std::vector<std;;string> vec2, wich also has 8 elements.
I want to copy all vec2 elements on vec1, to refresh the data of vec1
3/21/2019 8:29:57 AM
You can easily to that.
vec1.clear() // Clears the vector.
vec1.swap(vec2) // Copies the content.
Boy lr girl nurse ? (Good field !)
I'm on programming school in university
😄 ... please believe me. It was just coincidence. I am not in your head. I will answer you after work. My boss seems not amused.
Hahaha ok no problem ^^ you work in what ?
Nulpe thx I'll show you a code (that actually doesn't work) like that you'll know how I wanted to do
I didn't waiting for girl nurse haha, just to be curious ans know you a bit ^^
If you want to define your vector in a class, I have an example for you. 😁
Its also posible to set your String-Vector with the constructor.
I work as nurse and i am a student at a technical university
Boy nurse ... Sorry ^^
Here to learn programming
NoxFly ドリアン I believe "cout<<testVec" is in C++ not valid. You need a loop to print every element of an array or vector,.
okoh victory you are welcome ... I am a noob 😁
GET THE FREE APP
Learn Playing. Play Learning
Send us a message