What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-10-19 23:46:05
get values from a vector of vectors c++
#include <iostream> #include <vector> using namespace std; int main() { vector<vector<int> > buff; for(int i = 0; i < 10; i++) { vector<int> temp; // create an array, don't work directly on buff yet... Add solution -
C++ 2021-10-12 16:33:10
find nth word in sentence c++
#include <iostream> #include <string> #include <vector> using namespace std; void splitString(const string &str, vector<string> &output) { string::size_type start = 0; // Where to start string::size_type last = st... Add solution -
C++ 2021-10-08 22:47:04
remove element from vector on condition c++
#include <algorithm> #include <vector> // using the erase-remove idiom std::vector<int> vec {2, 4, 6, 8}; int value = 8 // value to be removed vec.erase(std::remove(vec.begin(), vec.end(), value), vec.end()); Add solution -
C++ 2021-10-08 12:11:05
vector in c++
// CPP program to create an empty vector // and push values one by one. #include <vector> using namespace std; int main() { // Create an empty vector vector<int> vect; &n... Add solution -
C++ 2021-10-07 13:23:05
how to make a vector in c++
// CPP program to create an empty vector // and push values one by one. #include <vector> using namespace std; int main() { // Create an empty vector vector<int> vect; &n... Add solution