I'm learning C++ at school on BC++. At home I use Dev C++ which is a little different from BC++. For example I have to add "using namespace std;" to use cout, cin etc.
This code works on BC++. It's suppose to get the positive numbers from those that we have. What do I have to add to make it work on Dev? I searched on Google, but I didn't find anythingthat could help me, and I don't really know what to search.Code:#include <fstream>
int main()
{
ifstream Fin("num.in");
ofstream Fout("num.out");
int n,x,i;
i<=1;
Fin>>n;
while(i<=n)
{
Fin>>x;
if(x>0) Fout<<x<<" ";
i=i+1;
}
Fin.close();
Fout.close();
return 0;
}