Search:

Type: Posts; User: coyotte508

Search: Search took 0.00 seconds.

  1. Thread: malloc (0)

    by coyotte508
    Replies
    18
    Views
    3,874

    Edit: Thanks Salem for your answer, thanks to...

    Edit:
    Thanks Salem for your answer, thanks to you I'm sure there are no probs.
    There is no crashing, but i needed to be sure.
  2. Thread: malloc (0)

    by coyotte508
    Replies
    18
    Views
    3,874

    ok thanks a lot. It'd be long to explain why...

    ok thanks a lot.

    It'd be long to explain why in some cases i may allocate 0 bytes.
  3. Thread: malloc (0)

    by coyotte508
    Replies
    18
    Views
    3,874

    I did it a few times (crashed windows), running...

    I did it a few times (crashed windows), running some SDL application of my own right after windows started. (blue screen of death... I saw it on Vista!)

    I'm totally OK with allowing 0 bytes, i'm...
  4. Thread: malloc (0)

    by coyotte508
    Replies
    18
    Views
    3,874

    malloc (0)

    Hey,

    I'm doing some weird things (mix of C/C++), and I'd like to know if I was allowed to use malloc(0):


    #include <stdlib.h>

    int main()
    {
    int *i = malloc (0);
  5. maybe using sizeof(): #include ...

    maybe using sizeof():


    #include <stdio.h>
    #include <stdlib.h>

    int main()
    {
    char *string1 = "Hello how are you?";
    char string[] = "hello how are you?";
  6. ok thanks.

    ok thanks.
  7. Question about the C99 standard (concerning union)

    Hi,

    I'm writing code that works, but in such a nasty way...


    typedef union Pixel
    {
    struct
    {
    unsigned bit0:1;
Results 1 to 7 of 7