why text file created is blank? : My code is

    #include<iostream.h>
    #include<conio.h>
    #include<fstream.h>
    #include<stdio.h>
    struct info
    {
    char product_name[100], Seller_Name[100], DOP[30];
    int  price;
    }data;

    void main()
    {
    ofstream fout("code.txt",ios::out);
    fout<< "ofstream fout(\"data.dat\",ios::binary|ios::out);\n"  ;
    while(1){
    cout <<  "Enter Product Name: ";
    gets(data.product_name);
	cout<<"Enter Seller Name: ";
  	gets(data.Seller_Name);
   	cout<<"Enter Date of Purchase: " ;
	gets(data.DOP);
    cout<<"Enter Price:" ;
	cin>>data.price;
    fout<<"strcpy(data.product_name,"<<data.product_name<<");";
    fout<<"\nstrcpy(data.Seller_Name,"<<data.Seller_Name<<");";
    fout<<"\nstrcpy(data.DOP,"<<data.DOP<<");";
    fout<<"\nstrcpy(data.price,"<<data.price<<");";
	fout<<"fout.write((char*)&data,sizeof(info));\n";
    }}

I am developing a software and am making sample data for it. So I made this application so I just have to copy statements and need not have to write it again. It worked the first time but now it is not working... Thankyou...




















