Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
ForwardListString2
//g++ 7.4.0 //original credit Geeks for Geeks #include <iostream> #include <forward_list> #include <string> using namespace std; int main () { forward_list<string> fs = {"Z","K","N"}; forward_list<string>::iterator ptr; ptr= fs.insert_after(fs.begin(),{"P","Q","R"}); cout <<" Forward list after insert after:\n"; for(string& s : fs) cout <<s<<" "; cout <<endl; fs.emplace_after(ptr,"S"); cout <<" Forward list after emplace after:\n"; for(string& s : fs) cout <<s<<" "; cout <<endl; ptr= fs.erase_after(ptr); cout <<" Forward list after erase after:\n"; for(string& s : fs) cout <<s<<" "; cout <<endl; return 0; }
run
|
edit
|
history
|
help
0
OTHER - Two robots
always_late
Palindromy
Dar
Straight Max-Min Divide and Conquer
Microsoft - MaxEmployeeAttendence (R repititions - 1st step towards DP.)
VirtualRestoPoint
Wave Sort
runtime template mode processor
Matrix spiral print