c++ - How to create new binary file in cpp -
i new in c++. tried create binary file in c++. not able create it.below source code.
void main() { ofstream myfile; myfile.open("d:\get\data.bin",ios::binary); if (myfile.is_open()) cout<<"hi"<<endl; else cout<<"bye"<<endl; } i bye output only. required target create binary file in d directory data file name.i using vs2010 , os win 7. providing
Comments
Post a Comment