Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
replace-30-Seconds-of-C++
#include <iostream> #include <vector> #include <algorithm> int main() { std::vector<int> origin {3, 5, 3, 1, 2, 3}; // replaces 3 by 0 std::replace(origin.begin(), //first origin.end(), //last 3, //old_vale 0 //new_value ); // origin is now {0, 5, 0, 1, 2, 0} for (auto value : origin) { std::cout << value << " "; } }
run
|
edit
|
history
|
help
0
homework
Policy based smart pointer
unordered_map
Web Browser History
12hours Clock c++
use of assert to check a particular situation! (throws error)
SayHi
N Qeens problem
Binary Search
Microsoft - # of fragments (optimised)