CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 15 of 31

Thread: Working with a database

Threaded View

  1. #16
    Join Date
    Jun 2010

    Re: Working with a database

    simple. The array right now is:
    Item ItemDef[4];
    When I add a new item to the list, I increase it (manually) to:
    Item ItemDef[5];
    No programs are resizing anything (well, except my IDE), it's all hard-coded.

    Well, I have another question. This one might be a bit trickier. Would it be possible to save a function's name as a variable, and then use that variable to call the function? For example:
    std::string functionVariable = "MyFunction()";
    specialvartype functionVariable = MyFunction();
    Can this be done, in part or in whole? This would let me store item scripts (as functions) as one of the variables in the definition. The alternative would be to store a script ID instead, and use the ID with a switch-case to determine which function to run. Any advice?
    Last edited by candlemaster; June 13th, 2010 at 09:01 PM. Reason: Added a question

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)