Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Stream4
//g++ 7.4.0 ////////////////////////////////////////////////////////////////////////// //Stream4 //this code is created by Rezaul Hoque on July 20,2022; //contact:jewelmrh@yahoo.com;Dhaka,Bangladesh;https://rezaulhoque.wordpress.com,https://hoquestake.blogspot.com //note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; ////////////////////////////////////////////////////////////////////////////// #include <fstream> #include <iostream> #include <iomanip> #include <string> #include <strstream> //stream manipulator std::ostream& l(std::ostream& os) { return (os<<"\n"); } void fill(char c) { std::cout.width(25); std::cout.fill(c); std::cout<<l; } int main() { fill('#'); char a[50]="hi there,how are you"; std::istrstream r(a); char s1[25],s2[25]; r>>s1; r.seekg(r.tellg()); r>>s2; std::cout<<"s1 :"<<s1<<l<<"s2: "<<s2<<l; std::ostringstream o(a); o.seekp(0,std::ios_base::end); o<<"?\nFine,Thanks!"; std::cout<<o.tellp()<<l; o<<"\nJuly 20,2022."; o.seekp(0); o<<'H'; std::cout<<o.str()<<l; fill('#'); return 0; }
run
|
edit
|
history
|
help
0
Microsoft - # of fragments (optimised)
OTHER - Two robots
barai_1
Synchro#1
პირამიდის პერიმეტრი.ფინალური
MapTel
2
basic caculate iii
Projekt misker
Roger Cheng