xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
Fayllar bilan ishlash
C/C++ tilida fayllar bilan ishlash uchun # include ulanishi kerak. ( faylli oqim) # include ning funksiyalari mavjud bolumotli fayl hosil qilish 2. ifstream lumotli fayldan foydalanish Ularning yozilishi quyidagicha: ofstream name (); ifstream name (); Masalan: ofstream farruh ( ); yoki ofstream shoh (); ofstream zara ( ); Bu erda: farruh, shoh, zara fayl nomi (fayllar .dat va .txt kengaytmali boladi: ifstream farruh ( ); yoki ifstream shoh ( ); ifstream zara ( ); Ochilgan fayllarni albatta yopish shart! name.close( ); Masalan: fattuh.close( ); shoh. close ( ); zara. close ( ); 1-misol. 2ta butun son va ularning yigzida saqlovchi fayl hosil qiling. Undan keyingi dasturda foydalaning. Sonlar indi toha; Oqim nomi toha.dat s = toha . dat s1 = paytirish, berilgan matrisanining izini hisoblash, vectorning yig akbar Oqim nomi akbar . txt paytma cout << "c=indisi cout << "s1="<Download 3,35 Kb. Do'stlaringiz bilan baham: |