Results 1 to 3 of 3

Thread: C++

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Jun:2011
    Location: shumen
    Posts: 13

    C++

    , .
    Code:
    void Add()
    	{
    	ofstream file;
    	file.open("Zakuski.txt", ios::app);
    	cout << "\n Broi zapisi, koito shte se dobavqt: ";	
    	int br;
    	cin >> br;
    	for(int j=i;j<br; j++) 
    	{
    		cout << "\n Dobavqne na zapis:"<<i+1<<"\n";
    		file <<"\n Zapis"<<"\n";
    		cout << "\n Ime na artikul: ";		
    		cin >> ar[i].ime;
    		file <<"\n Ime:"<<ar[i].ime;
    		cout << "\n Cena: ";		
    		cin >> ar[i].cena;
    		file << "\n Cena: "<<ar[i].cena;
    		cout << "\n Teglo:";
    		cin >> ar[i].teglo;
    		file <<"\n Teglo:" <<ar[i].teglo <<"\n";
    		i++;
    		file.close();
    	}
    }
    , . , 3 , , , .

  2. #2
    Registered User postscriptum's Avatar
    Join Date: Mar:2006
    Location: Shinra Labs
    Posts: 644
    , ,
    file.close(); .

  3. #3
    Registered User
    Join Date: Jun:2011
    Location: shumen
    Posts: 13
    , - . !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |