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
Stream10
extern
Test Swap Functions
LRUCache
Metodos
asa
bharat
c++_array_size
mur1
Regression Line