WFandella
Thursday, May 30, 2013
Input Output C++ Membuka File
#include<iostream.h>
#include<fstream.h>
int main()
{
const int MAX = 80;
char buffer[MAX+1];
ifstream file_objek;
file_objek.open("latihan.txt");
cout<<"Membaca isi file latihan.txt\n";
while(file_objek)
{
file_objek.getline(buffer,MAX);
cout<<buffer<<endl;
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Link
Contoh Program Menu Gabungan antara Queue & Sorting C++ (Struktur Data)
Mencari Nilai Terkecil Array (C++)
#include<stdio.h> #include<conio.h> int main(void){ int nilai[3];
Contoh Program Linked List insert Kanan (Struktur Data)
#include<stdio.h> #include<stdlib.h> #include<conio.h> void BUAT_SIMPUL(int X); void AWAL(); void CETAK(); void Ins...
No comments:
Post a Comment