Search:

Type: Posts; User: GReaper

Page 1 of 20 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    9
    Views
    179

    I think you misunderstood the use of...

    I think you misunderstood the use of fgetpos/fsetpos. fpos_t isn't (or rather, may not be) a simple integer. The content of an fpos_t object is not meant to be read/written directly, but only to be...
  2. Replies
    9
    Views
    179

    Oh, and Structure just reminded me that in C, the...

    Oh, and Structure just reminded me that in C, the FILE functions (ftell, fseek, etc), return/take "long" as the file offset. Depending on your OS, "long" may be 32-bit even if your system is 64-bit....
  3. Replies
    9
    Views
    179

    First of all, loading the whole file in RAM is...

    First of all, loading the whole file in RAM is out of the question, you can't assume the user has 10GB memory. Therefore you have to load the file in chunks, and keep unloading and reloading them as...
  4. Thread: Poor RyanC

    by GReaper
    Replies
    7
    Views
    162

    Oh, I finished college, was hoping that I'd get a...

    Oh, I finished college, was hoping that I'd get a decent job in software but no such luck. In my country, the market is saturated (if you don't want to be a code monkey), and unfortunately it took be...
  5. Thread: Poor RyanC

    by GReaper
    Replies
    7
    Views
    162

    Hey, long time no see. How've you been?

    Hey, long time no see. How've you been?
  6. Replies
    10
    Views
    262

    lol, no. Don't believe everything 4chan tells you.

    lol, no. Don't believe everything 4chan tells you.
  7. I'm just going to tell you to get a different...

    I'm just going to tell you to get a different book. "Let us C" is outdated and full of mistakes.

    Now, about your question, CodeBlocks has an option to compile as a static library, at...
  8. Replies
    24
    Views
    306

    In C, you need to declare the prototype of the...

    In C, you need to declare the prototype of the function (or define it altogether) before you use it. The prototype is just the function without the body, like this:


    // Do this before main
    const...
  9. Replies
    4
    Views
    144

    "a" is a static array of "int*" and of size "3"....

    "a" is a static array of "int*" and of size "3".

    A multi-dimensional array in C is just 1-D in memory. For example, the following two arrays are equivalent:


    #define COLUMNS 3
    #define ROWS 4...
  10. The CPU caches are aligned, meaning that if the...

    The CPU caches are aligned, meaning that if the loop is big enough, it's likely that some of it will be outside the current cache-line, making it slower. I don't think that's what's going on here...
  11. I'm not going to watch all those livestreams, but...

    I'm not going to watch all those livestreams, but your highlights video was nice.
  12. Thread: .cvs file

    by GReaper
    Replies
    4
    Views
    267

    A CSV file format is quite simple, after all it...

    A CSV file format is quite simple, after all it stands for "Comma Separated Values". The first row is typically the names of the different columns, and all of the following rows are data. Remember...
  13. Replies
    7
    Views
    247

    Maybe your second program doesn't generate those...

    Maybe your second program doesn't generate those escape codes correctly?
  14. Replies
    7
    Views
    247

    The console was finally updated in Windows 10, to...

    The console was finally updated in Windows 10, to support 8-bit and 24-bit color.

    Oh, about your question, I think that Windows 10 console accepts ANSI escape codes.
  15. But you don't. Assignment goes from right to...

    But you don't. Assignment goes from right to left, here you assign the pointer of matrix A to the pointer of matrix C, and then free/delete C(which is now A). If you wanted to change the 'A' matrix...
  16. C=A; free(C); What do you think these two...

    C=A;
    free(C);


    What do you think these two lines do?
  17. Replies
    12
    Views
    310

    You shouldn't do anything before or after the...

    You shouldn't do anything before or after the include guards. They're there to prevent you from including the file multiple times.
  18. Replies
    1
    Views
    186

    You need to #include "odinutilities.h" inside...

    You need to #include "odinutilities.h" inside "odinutilities.c".
  19. Replies
    1
    Views
    343

    I found this webpage...

    I found this webpage, it may solve your problem.
  20. Replies
    15
    Views
    658

    I'd use redirection instead of messing with...

    I'd use redirection instead of messing with opening/closing files, since it's a simple text file. Also, since it's a stream that shouldn't be expected to handle direct user input, or messages to the...
  21. Replies
    7
    Views
    325

    By default, input is line-buffered...

    By default, input is line-buffered in almost all systems. There is no standard way to get unbuffered input from the user. What you could do instead of asking for any key to be pressed is to ask for...
  22. Replies
    4
    Views
    281

    Yeah, I haven't come across this problem before,...

    Yeah, I haven't come across this problem before, but it looks like you shouldn't declare a prototype as inline.
  23. Replies
    4
    Views
    281

    Delete all *.o files and try again. If you could...

    Delete all *.o files and try again. If you could show us your Makefile, the problem may be somewhere in there.

    EDIT: Wait, no, it seems like making the prototype inline makes the function...
  24. I think that GCC leaves non-standard macros...

    I think that GCC leaves non-standard macros undefined when you ask for "c99". Try "gnu99" instead.
  25. Replies
    3
    Views
    264

    Compiles and runs just fine for me, without...

    Compiles and runs just fine for me, without having to make the change you did. Are you sure you haven't messed something up? For example, did you initially create the *.c file as a *.cpp file and...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4