Search:

Type: Posts; User: StapleGun

Search: Search took 0.00 seconds.

  1. Replies
    17
    Views
    2,733

    C++ and m/c/realloc with Native Types

    Is it safe to use malloc and it's derivatives with native C++ types? As sort of a learning experience I want to write my own stack class, first with integers, and I can't imagine how i'd write a...
  2. Replies
    8
    Views
    1,530

    Ah now I see what you're saying. But I'm not sure...

    Ah now I see what you're saying. But I'm not sure how I'd go about terminating that character? Haven't I declared nextChar int? As required by the function fgetc()?
  3. Replies
    8
    Views
    1,530

    Thanks, that was exactly the kind of information...

    Thanks, that was exactly the kind of information I was after regarding my file reading and string concatenation.

    I fully understand that a pointer to a character is not a string. (How could I have...
  4. Replies
    5
    Views
    1,208

    For your first line, try: while (ch == 'Y')...

    For your first line, try:


    while (ch == 'Y')
    {
    ...
    }

    Alternatively you could use:
  5. Replies
    16
    Views
    19,470

    I've tried this for Warcraft III. If you modify...

    I've tried this for Warcraft III. If you modify any data in an online game (ie; Gold, Lumber, Hero Exp) you will be instantly disconnected. Not exactly sure how Wc3 detects it, but I think it has...
  6. Replies
    8
    Views
    1,530

    I've sort of got it working. Here's the code I...

    I've sort of got it working. Here's the code I have:


    // Includes
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    // Prototypes
    char *strConcat(char *str1, char *str2);
  7. Replies
    8
    Views
    1,530

    Clarification with C-style Strings

    I've managed to load all of the text from a file into a single string. But I'm not sure if the way I've handled it is very safe, or very memory efficient. I'm still learning how all this stuff works....
Results 1 to 7 of 7