Thread: 'FILE fp is private within this context'

  1. #16
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Depends on what you're doing. If you're in an IDE (Dev-cpp, codeblocks, VS) putting everything into one single project will do the right thing automagically.

  2. #17
    Registered User
    Join Date
    Oct 2007
    all i've dealt with so far is writing code and compiling it, on dev-c++ and then importing it to linux to compile again, don't know how to make a project.

  3. #18
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    You fix it by properly compiling:

    Quote Originally Posted by anon View Post
    Or in other words, since you say you are getting linker errors it means that you must be compiling only main.cpp and not any of the other files.

    So again, have you created a project with Dev-C++ and added all the cpp files to it? You can compile single-file programs without a project but you need one if you have more files.
    Edit: If you're compiling on the command line, you need to specify all the .cpp files.

  4. #19
    Registered User
    Join Date
    Oct 2007
    ya, its working ok now. last time i did this is didnt make a project but it looks like i have to now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. disposing error
    By dropper166 in forum C# Programming
    Replies: 2
    Last Post: 03-30-2009, 11:53 PM
  2. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  3. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 05:02 AM
  4. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  5. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM