Search:

Type: Posts; User: zcot

Search: Search took 0.01 seconds.

  1. fyi: you could use fprintf exclusively here...

    fyi:

    you could use fprintf exclusively here instead of fwrite and printf additionally.. -for what you are doing here anyway:


    //print to file
    fprintf(file, "\nIP: %-7.16s",ip);

    //print to...
  2. Replies
    7
    Views
    1,542

    here's something not exactly relevant, but maybe...

    here's something not exactly relevant, but maybe it's helpful. ;)



    int r;
    fprintf(stdout, "program finished. press [spacebar] to quit\n");
    while((r = toupper(r = getch())) != ' ');...
  3. no, you can not compile a header file alone, so...

    no, you can not compile a header file alone, so don't think of it as a code file. If you were going to use only 1 file then it would be in somefile.cpp.. -a code file. But, if you need to use some...
  4. Replies
    8
    Views
    1,333

    thanks... oh geez yea.. tbh I don't even know...

    thanks...

    oh geez yea.. tbh I don't even know what I was thinking asking that.
  5. Replies
    8
    Views
    1,333

    I was a bit vague on purpose, as far as the...

    I was a bit vague on purpose, as far as the exactness of the class, and that's because I'm focusing NOT on the specific class but the design of classes, in relation to the design that I've posted. ...
  6. Replies
    8
    Views
    1,333

    Yes, thanks for pointing out that oversight. ...

    Yes, thanks for pointing out that oversight. Obviously my cutNpaste when whipping that up was a bit out of hand. ;)

    So....


    Is anybody looking at the function code in relation to memory...
  7. Replies
    8
    Views
    1,333

    ok yes, I understand that. And the first one is...

    ok yes, I understand that. And the first one is on the stack, but isn't part of it on the heap? ;)
  8. Replies
    8
    Views
    1,333

    using new/delete when building classes

    Is there a good and bad about this design?

    I'd like to look deeper into a good design of a class, mainly that would assumably be instantiated multiple times and used on the heap where bitmaps and...
  9. Replies
    6
    Views
    1,560

    Require? -No. It can be done just like the...

    Require? -No. It can be done just like the source above where boundaries, players, and enemies are any ASCII character. Maybe like this:



    //graphics
    char car = '+';
    char traffic[] = {'H',...
  10. Replies
    6
    Views
    1,560

    haha! pretty interesting. I'll suggest the...

    haha! pretty interesting.

    I'll suggest the typical top-down driving game for you.. your "car" or whatever is on the bottom and you have other scrolling objects come down the screen at you. You...
  11. Replies
    2
    Views
    4,329

    ok thanks.. yea I know very little about COM,...

    ok thanks..

    yea I know very little about COM, but I guess I'll be learning about it more now.

    And yes, I tried to get linkage to wmp.dll via the SDK-supplied intermediate files wmp.h and...
  12. Replies
    2
    Views
    4,329

    VC6 using WMP (.idl or .tlb help)

    can anybody get this to work?

    -downloaded the MSWMPSDK10 and wanted to try for a simple example. This sample intends to merely gain an interface to the already running Media Player and output the...
  13. Replies
    3
    Views
    1,842

    what exactly are you doing with this kind of...

    what exactly are you doing with this kind of thing:



    if (buffer=="!"){ //IF Proceeding line is a list name


    are you meaning to compare:
  14. yes, if you just expanded the while block to...

    yes, if you just expanded the while block to include the graphics code then at least something would happen. However I would also suggest a study of windows main loops. The structure you have will...
  15. Thread: xor Encryption

    by zcot
    Replies
    5
    Views
    1,997

    ok, I've come up with this.. I think it's...

    ok, I've come up with this.. I think it's right(but first time I've attempted insanity like that).



    void OriginalDecrypt(char* buf)
    {
    unsigned int nKey = buf[3] << 24;
    nKey |= buf[2] <<...
  16. Thread: xor Encryption

    by zcot
    Replies
    5
    Views
    1,997

    ..this is an index to the buf: for (i = 0;...

    ..this is an index to the buf:



    for (i = 0; i < 32; i++)
    unsigned int keyBit = buf[i/8];


    so that keyBit calculations are along this line:
    buf[0/8]
  17. Thread: argc

    by zcot
    Replies
    16
    Views
    2,683

    #include int printcommandline(int...

    #include <stdio.h>

    int printcommandline(int argc, char* argv[])
    {
    for(int c = 0; c < argc; c++)
    printf("%d->%s\n", c+1, argv[c]);
    return 5150;
    }

    int main(int argc, char*...
Results 1 to 17 of 17