Making your own manipulators in C++ (input).

in programming •  7 years ago 

 

Making Your Own Manipulators

In c++ you can make your own manipulators. Its very is and is fun.
Here I will show you an example a simple one. I tried to make it similar to an american drama serial The originals.

Dependency

it depends or changes from compiler to compiler and version to version of same compiler.
So make sure you check the documents of your compiler.

Program Body

#include iostream

#include string

#include iomanip

using namespace std;

istream &getori(istream &ori){

cout<<"any questions about the originals?"<<endl;

return ori;

}


int main(){

string questions;

cin>> getori >>questions;

return 0;

}

 Working Of Program

I hope you liked it stay tuned for more

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Wonderful educative post

I used to program in my first semester of engineering, now I hardly remember it :D

amazing work bro keep it up.