dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: candlemaster

Search: Search took 0.03 seconds.

  1. Re: Update all instances of a class with a single funtion?

    That pretty much describes what I want to do, yeah. How would I go about making a registry?
  2. Update all instances of a class with a single funtion?

    First of all, let me say that while I do know about classes and such, stuff like inheritance, templates, and other complex topics is pretty much beyond my level.

    My Timer class structure looks...
  3. Replies
    30
    Views
    2,783

    Re: Working with a database

    Wow, it works. Thanks paul!

    Now, as for how items are set up, the way I see it I have 2 choices.

    1) I can define all of the items in my custom header file. While un-elegant, and hurting...
  4. Replies
    30
    Views
    2,783

    Re: Working with a database

    I changed "typedef std::string *(scriptVar)();" to "typedef void *(scriptVar)();", but nothing's changed...
  5. Replies
    30
    Views
    2,783

    Re: Working with a database

    Ah, I see. The function is a void, not a string.
  6. Replies
    30
    Views
    2,783

    Re: Working with a database

    I'm trying, but it seems the closest I'm getting gives me this error message:

    cannot convert from 'void (__cdecl *)(void)' to 'scriptVar (__cdecl *)'

    Here's how I have it set:
    Just before the...
  7. Replies
    30
    Views
    2,783

    Re: Working with a database

    Well, the best way I can think of to do that, I could just as easily do that with a .xml file, but from what I understand of those, reading them directly is really clumsy, plus there's a xml schema...
  8. Replies
    30
    Views
    2,783

    Re: Working with a database

    Any idea where i should start?
  9. Replies
    30
    Views
    2,783

    Re: Working with a database

    Well right now, the item list is defined in a .h file, so I have to recompile every time I change the list anyway.

    If I could store the item list in an external file, such as .txt, it would be...
  10. Replies
    30
    Views
    2,783

    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];
  11. Replies
    30
    Views
    2,783

    Re: Working with a database

    Well, right now I'm defining the array at the same time as defining the items. I'm just adding 1 to the array size every time I make another item, so it's only as large as I need it.

    I don't plan...
  12. Replies
    30
    Views
    2,783

    Re: Working with a database

    Aaaah, I see. So, I could make a really huge array, store every item definition in there, and use the index as the item ID. Makes sense.

    Still open to ideas though, if anybody has a better idea....
  13. Replies
    30
    Views
    2,783

    Re: Working with a database

    No, no I'm not. That's why I'm here lol.

    So, if I were to do everything in the executable, I *think* that my best bet would be to save the entire item in the array, instead of the item's ID? Or...
  14. Replies
    30
    Views
    2,783

    Re: Working with a database

    Basically, the inventory I have right now is set up like this:


    invItem inventory[30];

    invItem is a struct, defined thusly:


    struct invItem
    {
  15. Replies
    30
    Views
    2,783

    Re: Working with a database

    Mkay, well knowing how to access a database is fine and dandy, but how do I create a database? Everywhere I look, the program is built almost entirely for use with a server, but I don't need that. ...
  16. Replies
    30
    Views
    2,783

    Re: Working with a database

    How would I go about using CRecordset?
  17. Replies
    30
    Views
    2,783

    Working with a database

    Firstly, forgive me - I'm pretty much a noob at C++, and only began re-learning it last week.

    I'm trying to make a simple game (mostly as practice). I want to access a database so that I can read...
Results 1 to 17 of 17


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)