so for my computing project we have just started to work with using input and output of text files, the tutorial my teacher gave said to include these libraries, which i did

#inclue <fstream>
#include <iomanip>

and explains how to use

ifstream fin;  //fin is my file input variable
  		  ofstream  fout;  //fout is my file output variable

the problem is dev c++ doesnt seem to recognize this, my teacher works with xcode so is that whats messing this up? or does my version need an update or something? or does dev do this a different way than xcode? sorry this is kind of a dumb question but dumb questions are easily answered

you have to tell the compiler that ifstream and ofstream are in std namespace. There are a couple ways to do that

#include <fstream>

using std::ifstream;
using std::ofstream;

or this

#inclue <fstream>
#include <iomanip>

int main()
{
   std::ifstream fin;
   std::ofstream fout;
}
Comments
think that did the trick thanks!

you have to tell the compiler that ifstream and ofstream are in std namespace. There are a couple ways to do that

#include <fstream>

using std::ifstream;
using std::ofstream;

or this

#inclue <fstream>
#include <iomanip>

int main()
{
   std::ifstream fin;
   std::ofstream fout;
}

perfect! works fine now thanks!

This question has already been answered. Start a new discussion instead.