inserter

how to write any custom data type to file using ifstream?

as question says, i want to write custom data type data of a class maybe to a file using ifstream in c++. Need help. ...