#include "stdio.h"
#include "conio.h"
#include "iostream.h"
#include "fstream.h"
void main()
{
char nama[15],nim[10];
ofstream f_out;
f_out.open("pelangi.txt");
cout<<"NIM : ";cin.getline(nim,sizeof(nim));
f_out.write((char*)&nim,sizeof(nim));
cout<<"Nama : ";cin.getline(nama,sizeof(nama));
f_out.write((char*)&nama,sizeof(nama));
f_out.close();
getch();
}
0 komentar