devxlogo

Output Data into a File

Output Data into a File

Use the following code:

#include void main(){ char name[15]; double salary; ofstream outFile(“FileName.txt”, ios::in); while (outFile){ outFile >> name >> salary; }}

devx-admin

Share the Post: