Search:

Type: Posts; User: moi

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    0
    Views
    1,035

    Runtime error in VFW codec?

    I'm currently writing a VFW codec, but am getting:



    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more...
  2. Thread: i < x or i != x?

    by moi
    Replies
    5
    Views
    1,004

    I'm not an assembly expert, but I know on at...

    I'm not an assembly expert, but I know on at least one architecture (ARM) those will both take exactly the same amount of time; cmp and then beq or bge (or bne vs blt); half a dozen in one hand and 6...
  3. Replies
    2
    Views
    2,779

    don't know how universal the support of these is,...

    don't know how universal the support of these is, although i've successfully used 5 6 5 reverse



    #define GL_UNSIGNED_BYTE_3_3_2 0x8032
    #define GL_UNSIGNED_SHORT_4_4_4_4 ...
  4. Thread: Profiling

    by moi
    Replies
    2
    Views
    900

    The run I have is about 30 seconds of cpu time on...

    The run I have is about 30 seconds of cpu time on a 2.6ghz P4, with over 1.5 billion function calls recorded by gprof. :D
  5. Thread: Profiling

    by moi
    Replies
    2
    Views
    900

    Profiling

    Yarrr... did an internets search, board search, found a lot of references to this, but no answers. Using gcc (Mingw); and I want to profile. Compile everything and link with -g -pg, run the...
  6. Replies
    2
    Views
    1,169

    Don't feel like writing a response, so you get...

    Don't feel like writing a response, so you get year+ old threads. See my code example here. YMMV.
    http://cboard.cprogramming.com/showthread.php?t=57353
  7. Replies
    3
    Views
    1,407

    Array indicies start at 0, but the size of it is...

    Array indicies start at 0, but the size of it is still 1 based; so char card[2] gives you spots card[0] and card[1]...
  8. Thread: pointer aliasing

    by moi
    Replies
    2
    Views
    1,344

    Yeah, that should work; I'll probably switch to...

    Yeah, that should work; I'll probably switch to it... in GCC I could also use the union hack



    union
    {
    u64 big;
    u32 small[2];
    } foo;
  9. Thread: pointer aliasing

    by moi
    Replies
    2
    Views
    1,344

    pointer aliasing

    So my current project which I'd been compiling so far with no -O flag, breaks some things on-O2 (although it's spiffy faster). I've been scrounging around a little bit and read up on the evilness of...
  10. Thread: Inline Functions

    by moi
    Replies
    4
    Views
    1,173

    There is no language difference between .c and .h...

    There is no language difference between .c and .h files; so anything that you can do in C you can do in a header file. Remember, #including a header file is equivalent to taking that file and...
  11. Replies
    52
    Views
    3,807

    Considering the average user competency level,...

    Considering the average user competency level, I'd have to concede his point.
  12. Thread: simple triangle

    by moi
    Replies
    3
    Views
    2,326

    Inside the loop for each line, instead of having...

    Inside the loop for each line, instead of having two loops, one for '*' and one for ' ', think about how you could do those both in one loop with a conditional to print either '*' or ' ' depending on...
  13. Replies
    10
    Views
    1,067

    Much the same as we have a windows specific and...

    Much the same as we have a windows specific and linux specific board; sure you can write ansi C/C++ but there are also platform specific things you'd want to do.
  14. Replies
    10
    Views
    1,523

    change=p-t; bills=(int) change; You have...

    change=p-t;
    bills=(int) change;

    You have declared change as an int, so the first statement already discards any decimal part on p-t, and the cast is redundant (since both are int). Is this what...
  15. Replies
    2
    Views
    721

    Perfect, did exactly what I needed. Thank you :)

    Perfect, did exactly what I needed. Thank you :)
  16. Replies
    2
    Views
    721

    recieve signal when file written to

    Hi. :) I would like to have my program watch over a particular file, and then recieve a signal (to probably wake a sleeping thread) when that file is written to by any other program.

    Something...
  17. Replies
    3
    Views
    8,836

    Never rely on undefined behavior, as has already...

    Never rely on undefined behavior, as has already been stated. But what is happening is this; when a function takes a variable number of arguments, arguments get default promotions. In particular,...
  18. Replies
    15
    Views
    1,953

    >1) Jango Fett was the "host" for the clone army...

    >1) Jango Fett was the "host" for the clone army that was created for the republic, however he was fighting on the other side. Why be the host then? Seems stupid to be responsible for creating an...
  19. Replies
    11
    Views
    1,257

    Once you understand the basics of working with...

    Once you understand the basics of working with char arrays, this shouldn't be hard to implement. Starting at the pointer to the beginning of the string, step through it incrementing the pointer and...
  20. Replies
    8
    Views
    1,655

    i think i have the gets() avatar right? i'll...

    i think i have the gets() avatar right? i'll post now then. it seems appropriate.
  21. Thread: finding a colon

    by moi
    Replies
    12
    Views
    1,184

    You're not testing for a ':' anywhere in that...

    You're not testing for a ':' anywhere in that code; why do you expect it to find any colons?
  22. Thread: compilers

    by moi
    Replies
    7
    Views
    1,122

    I wouldn't reccomend it

    I wouldn't reccomend it
  23. Replies
    3
    Views
    1,066

    why are you passing a username and password...

    why are you passing a username and password variables to sprintf() after your format string? there arent any conversion specifiers in it
  24. Replies
    8
    Views
    1,196

    printf("Enter the starting time: "); ...

    printf("Enter the starting time: ");
    scanf("%c", &starting_time);
    printf("Enter the ending time: ");
    scanf("%c", &ending_time);


    What is the type of &starting_time ? What type does...
  25. Replies
    30
    Views
    3,257

    You seem to be lost. Are you looking for the C++...

    You seem to be lost. Are you looking for the C++ board?
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4