Search:

Type: Posts; User: claudiu

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    3
    Views
    1,854

    Start like this: #include int...

    Start like this:



    #include <stdio.h>

    int main(void)
    {
    /* Logic goes in here */
    return 0;
  2. Replies
    6
    Views
    1,057

    Unless this is the "call a friend" stage on who...

    Unless this is the "call a friend" stage on who wants to be a millionaire I am not interested.
  3. Replies
    3
    Views
    813

    You are not lost, you are just lazy. There is a...

    You are not lost, you are just lazy. There is a major difference between the two.
  4. Replies
    2
    Views
    1,310

    I find that this is true for many other things in...

    I find that this is true for many other things in life nowadays, not just programming assignments. Over pampering seems to be the rule of thumb, which is very sad. Then again you get some lucky...
  5. Replies
    17
    Views
    2,926

    I agree with iMalc it really is both. The...

    I agree with iMalc it really is both.

    The problem with the high/low taxonomy is that besides its irrelevance it also gives the wrong derogatory perception, that for example a "low level language"...
  6. Replies
    11
    Views
    8,371

    I don't want to blame anyone for anything. :) I...

    I don't want to blame anyone for anything. :)
    I was just offering some food for thought that you need to be aware of what you are doing when using scanf. Of course there is a bug in there, that was...
  7. Replies
    11
    Views
    8,371

    Not necessarily always safe, but certainly safer....

    Not necessarily always safe, but certainly safer.

    What about this case:




    char *str;
    size_t len;
  8. Replies
    9
    Views
    2,632

    We are not keen to take part in evil activities.

    We are not keen to take part in evil activities.
  9. Replies
    3
    Views
    1,484

    Well it depends on what your input file will look...

    Well it depends on what your input file will look like. If you are guaranteed that your words are separated by one "space" (whatever character that may be) and one space only then yes. But if you...
  10. A stupid question deserves a stupid solution: ...

    A stupid question deserves a stupid solution:

    Make str_cpy and str_cat do absolutely nothing and just return 0. (that's two lines of code)
    Make str_printf malloc memory for s and initialize it to...
  11. Replies
    7
    Views
    1,183

    Do you have a debugger available such as gdb?...

    Do you have a debugger available such as gdb? This is a great time to learn how to use it. Step through the code and verify that the values in your variables (shift and ch) are what you expect them...
  12. Replies
    7
    Views
    1,183

    Let me google that for you...

    Let me google that for you
  13. Replies
    4
    Views
    1,071

    Your loop is wrong. Try to refer to arrays...

    Your loop is wrong.

    Try to refer to arrays using their index not using *(src + i) pointer notation to make things easier. You are going way too far in the loop because your condition is wrong....
  14. Replies
    13
    Views
    1,498

    1)You sound like you are up to no good. 2)You...

    1)You sound like you are up to no good.

    2)You probably can't write code that works on any machine yet you want to write some hackbarf to steal your girlfriend's email password or some stupid thing...
  15. Are you guys kidding me? Even if choice was an...

    Are you guys kidding me? Even if choice was an array instead of a single char you still wouldn't compare its "value" to "Yes" or "No" using ==. The OP's problem is that he has no idea how scanf works...
  16. Note that it is usually extremely inefficient to...

    Note that it is usually extremely inefficient to insert at the end of a single linked list unless you are maintaining a pointer to the end of the list. Otherwise, you iterate over the whole list...
  17. Thread: pointer help

    by claudiu
    Replies
    12
    Views
    1,321

    I think this post describes the problem with a...

    I think this post describes the problem with a short humorous anecdote.

    Why casting malloc is a bad idea...
  18. Thread: pointer help

    by claudiu
    Replies
    12
    Views
    1,321

    If you want to compile in C++ you might as well...

    If you want to compile in C++ you might as well drop all the "C-style" and write C++ code. Use strings instead of char arrays, use references in functions instead of passing pointers and allocate...
  19. Thread: pointer help

    by claudiu
    Replies
    12
    Views
    1,321

    Stop spoon feeding solutions to newbies that...

    Stop spoon feeding solutions to newbies that provide no code.

    Also, don't cast malloc.
  20. Replies
    3
    Views
    1,085

    Without code it's difficult to say what is going...

    Without code it's difficult to say what is going on... I would bet that your I/O is different from what the automatic tester expects. I would read the requirements in the problem description again...
  21. Replies
    19
    Views
    6,679

    Well I am assuming that GetInt is probably...

    Well I am assuming that GetInt is probably reading an integer from the standard input (i.e. keyboard) and is validating that the input is actually an int. If the validation fails it either throws an...
  22. Replies
    19
    Views
    6,679

    While I don't want to be presumptuous this sounds...

    While I don't want to be presumptuous this sounds dangerously close to "hey kids, let's not bother learning the C language I/O and use the instructor's crap library to avoid all that ugly stuff."...
  23. Replies
    6
    Views
    927

    Your for loop is wrong. You want to increment i...

    Your for loop is wrong. You want to increment i and not decrement n. n should not change at all.
  24. As always VS is a crap IDE choice for working in...

    As always VS is a crap IDE choice for working in C. It is far too bloated with features that will slow you down rather than increase your productivity simply because:
    a) you don't know what they are...
  25. Heh, looks like another sighting of a manbearpig.

    Heh, looks like another sighting of a manbearpig.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4