FileOpen error

This is a discussion on FileOpen error within the C++ Programming forums, part of the General Programming Boards category; Greetings!!! I've got a question again.. I'm using the FileOpen function, and I ran into a problem.. I was developing ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    105

    FileOpen error

    Greetings!!!

    I've got a question again..
    I'm using the FileOpen function, and I ran into a problem..
    I was developing and testing my program, but suddently after some minor modifications the FileOpen function gave a '-1' vaule, which indicates an error. Frankly, I don't even understand how it could have happened... I mean the file name is correct. It cant be incorrect. There's no problem with whatever rights. I only want to read it.
    So I got the idea to check what's wrong. There has to be an error code which will tell me what's wrong.
    So please help me out. How can I read that error code, and how can I get the exact error looking at the integer value of the error code?

    Thanks a lot.

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    105
    Hmm... Weird.. It seems that I've solved the problem... I used an element of a String array as the filename... I put it into a separate string and now it works.... Weird, really weird...

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Is it the FileOpen() function or OpenFile() function?

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    105
    FileOpen(filename, openmethod)

    But it's okay now....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  2. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 12:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21