Thread: Remotely Creating Variables

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    5

    Remotely Creating Variables

    Is it possible to have someone type up a text file (*.txt) so that when the program starts, it will use variables declared in the text file as real variables, or would I have to have a pre-defined set of variables?

    If that's not possible, then would it be possible to have a text-file set some variables?

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Yes it's possible. You could design a class to hold the variable's information like it's name and size and create a new class object each time a new variable declarion is found in the file. It wouldn't be as efficant as variables declared in the program but this is the sort of thing that makes scripting languaes less efficant then compiled programs.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. basic question about global variables
    By radeberger in forum C++ Programming
    Replies: 0
    Last Post: 04-06-2009, 12:54 AM
  2. Best way to avoid using global variables
    By Canadian0469 in forum C++ Programming
    Replies: 7
    Last Post: 12-18-2008, 12:02 PM
  3. Replies: 15
    Last Post: 09-30-2008, 02:12 AM
  4. Classes, dynamic variables, and leaks.
    By Grins2Pain in forum C++ Programming
    Replies: 8
    Last Post: 09-26-2003, 03:07 PM
  5. static variables
    By Luigi in forum C++ Programming
    Replies: 4
    Last Post: 04-24-2003, 07:13 PM