CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2000
    Posts
    5

    Variable Question

    I am working on a program the has to look for certain files in a directory. This directory might change names. Right now I have the paths hardcoded in the program. I would like to know how to referce the paths by either an external text file or a registry entry. Does anyone know of a good reference for this out on the web.

    Thanks


  2. #2
    Join Date
    May 2001
    Posts
    155

    Re: Variable Question

    what do you mean by referce?

    --Ant
    --------------------------------------------------
    check out my newest freeware
    E-mail me at: [email protected]
    for the address

  3. #3
    Join Date
    Oct 2000
    Posts
    5

    Re: Variable Question

    What I mean is I want the value of the varable stored in an external source and not hardcoded in the program.


  4. #4
    Join Date
    Dec 1999
    Location
    Dublin, Ireland
    Posts
    1,173

    Re: Variable Question

    You can save and read strings to the applications part of the registry - have a look at the SaveSetting and LoadSetting keywords.

    D.

    -------------------------------------------------
    Ex. Datis: Duncan Jones
    Merrion Computing Ltd
    http://www.merrioncomputing.com
    '--8<-----------------------------------------
    NEW -The printer usage monitoring application
    '--8<------------------------------------------

  5. #5
    Join Date
    Nov 2000
    Location
    Ohio
    Posts
    238

    Re: Variable Question

    you could just store the path names in a basic text file.. open the text file and read the paths.
    You would then just have to change the paths in the text file instead of in your code.




  6. #6
    Join Date
    Jul 2000
    Posts
    124

    Re: Variable Question

    You can also use ini files to save this information.



Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured