Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    7

    Cool ifstream istr (filename.c_str());

    Hi everyone,

    Im following the OpenGL VTM on the OBJ viewer lesson.

    Im using VS2010 and im getting an error on the "ifstream istr (filename.c_str());". it says:
    Error: incomplete type is not allowed

    can anyone help me out?

    thkx!
    !!HAVE FUN!!

  2. #2
    Join Date
    Aug 2003
    Posts
    7
    solved!
    insted of including the iostream and using std::ifstream, just included fstream and using std::fstream

    I hope it would help anyone with the same problem
    !!HAVE FUN!!

  3. #3
    Join Date
    Jun 2003
    Location
    Trier, Germany
    Posts
    1,350
    you were just including the wrong header. ifstream is a filestream and as such declared in fstream. iostream just includes standard i/o headers and some aliases to them, like ::std::cout.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •