I am learning C++ at school, but I have a Mac and I just started using Xcode. I use the fstream library.
I need to know where the ".out" file is located or how to create it.
I managed to create the input file and if I use "cout" to display the result it works. Hope I explained everything well, here is a very basic program to show you what I mean:
#include <fstream>
using namespace std;
int main()
{
int a,b;
ifstream in("test.in");
ofstream out("test.out");
in>>a>>b;
out<<"a+b= "<<a+b;
}
I need to know where the ".out" file is located or how to create it.
I managed to create the input file and if I use "cout" to display the result it works. Hope I explained everything well, here is a very basic program to show you what I mean:
#include <fstream>
using namespace std;
int main()
{
int a,b;
ifstream in("test.in");
ofstream out("test.out");
in>>a>>b;
out<<"a+b= "<<a+b;
}