//************************************************* //how to use func put in binary file //in this case write all system chars in file Chars //************************************************* #include #include using namespace std; //================================================= int main(){ ofstream out("Chars",ios::binary|ios::out); if(!out){ cout<<"Error opening file\n"; return 1; } for(int i=0;i<255;i++){ out.put((char)i); } out.close(); return 0; }