Search:

Type: Posts; User: erikkonstas

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    177

    I can, too!

    I can, too!
  2. Replies
    6
    Views
    163

    Nope, everything should be an int here,...

    Nope, everything should be an int here, especially since % is used.
  3. Replies
    8
    Views
    143

    Hm, I wanted to emphasize laserlight's point...

    Hm, I wanted to emphasize laserlight's point above; you do not want to compute the file size beforehand! Who knows what your function will accept as its argument? What if it receives STDIN, for...
  4. Hm, can you mention why you'd want to do this?...

    Hm, can you mention why you'd want to do this? The text "width" you're talking about depends completely on the font the text is written in; for example, on a terminal, the font will most likely be...
  5. Depending on how the "array" is declared, it can...

    Depending on how the "array" is declared, it can also mean that what you pass to sizeof might be a pointer so it returns that size, not the array's! We really need to see more code to be sure what's...
  6. Can you clarify this, please? I can't understand...

    Can you clarify this, please? I can't understand exactly what you want to do.
  7. Replies
    7
    Views
    538

    Hi, can you show what you've done so far? We...

    Hi, can you show what you've done so far? We don't generally do other peoples' homework entirely.
  8. Replies
    6
    Views
    603

    Yep, that's exactly my point about Sedgewick. So...

    Yep, that's exactly my point about Sedgewick. So I checked again, we're actually using the THIRD edition at university, and the thing where the text and the code differ a lot semantically is very...
  9. Replies
    6
    Views
    580

    On top of that, it appears that you've copied...

    On top of that, it appears that you've copied your code incorrectly here, because I can see a missing ) on line 29.
  10. Replies
    6
    Views
    603

    Yeah... I happen to be experiencing Sedgewick's...

    Yeah... I happen to be experiencing Sedgewick's snippets from this very book (second edition, current university professor is using it) and his coding style is HORRENDOUS!!! Globals everywhere (in...
  11. 1. argv is actually an array of pointers to char...

    1. argv is actually an array of pointers to char (char *), the first of which is at the memory address in the argv variable itself, which is why you're "requesting another pointer". Each of these...
  12. I want to point out that setting i to values...

    I want to point out that setting i to values above 0 does actually do something bad in your case: if your string's length is less than the initial value of i, you will be accessing memory you...
  13. Hm, bummer. I was trying to write some test...

    Hm, bummer. I was trying to write some test project which has a lot of functions and decided to split them in a few .c files but I guess I'll have to do either of these two. Thanks for answering,...
  14. "External" linkage between some files but "internal" linkage to the outside world

    Let's say I have a file f1.c with the following:
    int two(int a, int b) {
    return a + b;
    }And a file f1.h with the following:
    int two(int, int);And a file f2.c with the following:
    #include...
Results 1 to 14 of 14