Search:

Type: Posts; User: icoigo

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    4,696

    Regarding uint8 and uint8_t

    I see people like to use uint8 for buff declaration. It looks good to me as well, but I just wonder which header file I should include to use that type or I have to define it by myself? I think it...
  2. Is there any demonstration to show how to...

    Is there any demonstration to show how to translate recursion into non-recursion by not using explicit stack?
    No idea how or even know if my recursive method can be translated into non-recursion one.
  3. What do you mean by "not really worth it"? Those...

    What do you mean by "not really worth it"? Those options has any drawback?
  4. Cool, after compiling with -O3 option, the C...

    Cool, after compiling with -O3 option, the C program only takes 1990 milli-seconds to get the result.
  5. I use gcc on my iMac, both program(Java and C)...

    I use gcc on my iMac, both program(Java and C) are run in terminal. OS is Mac OS X 10.6.4
    I don't think I turn on the optimizations option, can you tell me how?
  6. I change my C program codes as suggested, no...

    I change my C program codes as suggested, no memory allocation any more. I change my Java codes as well, no clone data.
    However, Java program takes 2049 milli-seconds while C program takes 2969...
  7. After changing the codes as above, change the way...

    After changing the codes as above, change the way to allocate and free memory, the C program only takes 33 seconds to get the result. Pretty cool!
  8. As my first post said, I know this should be the...

    As my first post said, I know this should be the biggest time consuming.



    I just what to know how to improve it because I am new to C, that also mean I am new to memory management stuff.
  9. Hi All, This is the code of the recursive...

    Hi All,

    This is the code of the recursive method. Thank you all for your reply and take time to help me improve my C programming skill.
    Java code:




    public static boolean...
  10. I thought C is faster than Java, it seems I was wrong

    I was a Java programer, I start to learn C programming now. I thought C is faster than Java, and the performance is much better because games are most likely written in C.

    Last night I wrote a...
  11. Thread: Usage of fgets

    by icoigo
    Replies
    6
    Views
    1,348

    Thanks for your codes, but I don't want to...

    Thanks for your codes, but I don't want to validate the input and throw out an error message to terminate my program, I just want to ignore the useless user input(those characters beyond the first 10...
  12. Thread: Usage of fgets

    by icoigo
    Replies
    6
    Views
    1,348

    No. The real problem is, I want to store user...

    No.
    The real problem is, I want to store user input into a char[], so I can allocate memory as char[10], I expect the user input data 10 bytes each row, and I will request the user input for 3 rows,...
  13. Thread: Usage of fgets

    by icoigo
    Replies
    6
    Views
    1,348

    Usage of fgets

    <<< split from http://cboard.cprogramming.com/c-programming/65068-fgets-while-loop.html >>>

    I have the same problem now, how to solve this?
    Use another fgets to retrieve those "rubbish data" and...
  14. Replies
    2
    Views
    5,653

    Array size base on user input

    If I have an array which its size is based on the user input, from some material, I need to use malloc function to allocate memory for that array what is known dynamic array. Don't forget to free it....
Results 1 to 14 of 14