GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 14-Apr-2006, 12:18
yuide yuide is offline
New Member
 
Join Date: Apr 2006
Posts: 1
yuide is on a distinguished road

Dynamic definition?


I have made a program based on some of macro definitions (#define name numeric-value). Now I want to make these changeable from the executable file without rewriting the entire program. How should I do?
  #2  
Old 15-Apr-2006, 11:56
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,234
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Dynamic definition?


You won't be able to change the #defines without recompiling; however, there are a few other possibilities that come to mind...
1. have the program read/write to a config. file (like a .ini file)
2. have the program read/write registry key values.
3. pass arguments to the program with each execution.

maybe others will post with more ideas.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
 
 

Recent GIDBlogNot selected for officer school by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to initialize an array in a class definition or in constructor? pablowablo C++ Forum 17 05-Sep-2009 12:14
Dynamic vs Static Arrays WaltP Miscellaneous Programming Forum 5 16-Feb-2006 15:54
In which case static object - dynamic object can be used Janakiraman MS Visual C++ / MFC Forum 8 17-Jan-2006 14:08
justifying text with dynamic programming twigboy C++ Forum 6 03-Feb-2005 14:30
problem reading to a dynamic array noamfrie C Programming Language 9 02-Jan-2005 18:35

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 18:05.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.