Hiya
If i have for example
How can i open file,write the 'S' and 'P' into it,close it , than open it and print the data in it?
By far all i can do is :
using the fstream library
thanks in advance
If i have for example
Code:
#include<iostream.h>
int main()
{
int s1=2;
int p1=3;
int S,P;
s1+=1;
p1+=1;
S=s1;
P=p1;
cout<< "This is S:" <<S<<endl;
cout<<"This is P:"<<P<<endl;
return 0;
}
By far all i can do is :
using the fstream library
Code:
ofstream file_name;
file_name.open ("file_name.txt");
file_name << "The S is: "<<S<<"\n The P is: "<<P<<"";
file_name.close();