Thread: Very very simple file input question.

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    74

    Unhappy Very very simple file input question.

    Man I feel like an idiot. I searched this sites tutorial section and used the search feature, but didn't find my answer. Frankly I don't know what to Google either.


    Simple problem:

    My file structure:
    Code:
    Program.exe (file)
    Games (directory)
       - SomeFile.dll
    My code trying to access SomeFile.dll
    Code:
    gameLibInst = LoadLibrary("..\\Games\\SomeFile.dll");
    The problem is in red. What do I have to do for this to work without typing out the entire path?

    I've tried the obvious, but perhaps I'm retarded:

    Code:
    gameLibInst = LoadLibrary("..\\Games\\SomeFile.dll");
    gameLibInst = LoadLibrary(".\\Games\\SomeFile.dll");
    gameLibInst = LoadLibrary("\\Games\\SomeFile.dll");
    gameLibInst = LoadLibrary("Games\\SomeFile.dll");
    gameLibInst = LoadLibrary(".\Games\SomeFile.dll");
    etc...etc..

  2. #2
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    LoadLibrary("Games/SomeFile.dll"); ?

    There is nothing important to go up to with ../ if your directory tree is really the way you say it is.

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    74
    Thanks mate that did the trick.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  2. fscanf in different functions for the same file
    By bchan90 in forum C Programming
    Replies: 5
    Last Post: 12-03-2008, 09:31 PM
  3. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  4. quick question: File Input
    By meltingdude in forum C Programming
    Replies: 1
    Last Post: 04-08-2003, 02:02 AM
  5. File Input and Output, simple.
    By Vber in forum C Programming
    Replies: 5
    Last Post: 11-17-2002, 02:57 PM