   file ints
  Ok i know how to read strings and chars from a file.But i have no idia how to input an int into a file and then how to read it again.I have searched every where and cannot find an example or tutorial.Can some one help me out?  Tnx in advanced. 
  What programming language are you using? ;  C++ win32 console application in vc++ ;  Can any one help?(Sorry about double post but i didnt want the thread to dissapear without an answer) ;  To text format an integer out to a file and read it back in:  int my_int = something;  // to write:  {    std::ofstream ofs("myfile.dat");    ofs << my_int;  }  // to read:  {    std::ifstream ifs("myfile.dat");    ifs >> my_int;  }  To binary format an integer out to a file and read it back in:  int my_int = something;  // to write:  {    std::ofstream ofs("myfile.dat");    ofs.write(reinterpret_cast<char *>(&my_int), sizeof(my_int));  }  // to read:  {    std::ifstream ifs("myfile.dat");    ifs.read(reinterpret_cast<char *>(&my_int), sizeof(my_int));  } ;  Thanks it works now 