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 Linked List, Insert Kiri, Insert Kanan, Hapus Depan, Hapus Belakang (Struktur Data)
#include<iostream.h> #include<conio.h> #include<stdio.h> #include<alloc.h> void buat_baru(); void insert_kiri(...
Link
Contoh Program Struktur Data C++ Berikut merupakan contoh-contoh program yang pernah saya kerjakan saat awal-awal belajar stuktur data w...
"Username & Password" (Contoh Program C++)
#include <iostream.h> #include <conio.h> main (void) { int username, password;
No comments:
Post a Comment