I am new in c++. I tried to create the binary file in c++. But not able to create it.Below is my 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 always get bye output only. My required target is to create a binary file in D directory with the data as a file name.I am using VS2010 and os is win 7. for providing the help