Search:

Type: Posts; User: jimblumberg

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    1
    Views
    89

    First do you realize that you could do this...

    First do you realize that you could do this without the array?

    Second do you realize that you're using the variable i before it is assigned an actual valid value? It has the value of zero when...
  2. It would be helpful to see some of the actual...

    It would be helpful to see some of the actual commands allowed.

    Also is it guaranteed that the "messages" will always be in upper case?

    You may want to simplify your if statement chain. It...
  3. Thread: strcmp

    by jimblumberg
    Replies
    4
    Views
    169

    No the problem is that scanf() requires two...

    No the problem is that scanf() requires two entries, are you entering two strings?
  4. Thread: strcmp

    by jimblumberg
    Replies
    4
    Views
    169

    Yes your scanf() requires two entries and it will...

    Yes your scanf() requires two entries and it will wait until you enter both entries.

    Instead of using strcmp() perhaps you should try strlen() to check the length of the string.
  5. Replies
    23
    Views
    522

    You may want to consider creating the copy...

    You may want to consider creating the copy constructor and the assignment operator overrides, m1(0, 0) = m2(0, 0); probably requires the assignment operator.
  6. Have you tried your favourite search engine? "c...

    Have you tried your favourite search engine? "c definition versus declaration" produces over 130,000,000 results, surely at least one of those links would answer your question.
  7. Replies
    4
    Views
    133

    So do you know how to do the first part (prompt...

    So do you know how to do the first part (prompt the user)?

    What about the second part (return a value)?

    You really should also start looking for a better book. Your current book is probably...
  8. Thread: EXE file

    by jimblumberg
    Replies
    11
    Views
    460

    I'm not talking about that error message. I'm...

    I'm not talking about that error message. I'm talking about the compiler error messages in your IDE, not the "runtime" message.

    For example the code you supplied gives the following errors in my...
  9. Thread: EXE file

    by jimblumberg
    Replies
    11
    Views
    460

    Probably because the build failed. Cut and...

    Probably because the build failed.

    Cut and paste the error messages from the IDE, the picture is pretty much unreadable.

    If all else fails cut and paste the complete code, inside code tags in a...
  10. Replies
    1
    Views
    185

    What do you think the values should be? Did...

    What do you think the values should be?

    Did you plug the snippet into a program and print the values?

    Are you sure that you copied the code correctly?
  11. Well I can't reproduce either of the "results",...

    Well I can't reproduce either of the "results", because the code you provided fails to compile.

    Perhaps you left off some important code, ie. header files?
  12. What operating system are you using? What...

    What operating system are you using?

    What parameters are you using with md5sum?

    What is md5sum returning?
  13. However when I do the same with binary ones there...

    However when I do the same with binary ones there is sth wrong as md5sum doesnt match.

    Could the problem be due to different line endings?

    But really you're not showing near enough content....
  14. You should really consider using std::string...

    You should really consider using std::string instead of the error prone C-strings.

    In your setName() function you should first verify that the passed C-string is small enough to fit into the name...
  15. Replies
    5
    Views
    327

    The problem is that the pointer is local to the...

    The problem is that the pointer is local to the function and will only be valid in that function.

    Instead of "returning" a pointer it would be better to pass the pointer into the function.


    ...
  16. All input should be coming from that input file....

    All input should be coming from that input file.


    That structure seems wrong. What about the first entry?
  17. Please show your input file "contacts.txt". Do...

    Please show your input file "contacts.txt".

    Do you realize that your run line ("./project1 <contacts.txt") is using input redirection? Which means that the above file should contain all your input...
  18. Replies
    2
    Views
    217

    A couple of things. First line 12 is...

    A couple of things.

    First line 12 is incorrect (look at line 16 for a hint).

    Second line 21 is invoking undefined behaviour, you're attempting to increment the same value twice without a...
  19. Double post...

    Double post. Please don't post the same question in multiple sub-forums.

    Also this is a C++ question not a C question.
  20. Also posted here...

    Also posted here.
  21. That was already suggested in the link pointed...

    That was already suggested in the link pointed out by Salem.

    By the way this topic should really be in the Windows forum, since using the Windows api is a requirement.
  22. Replies
    4
    Views
    261

    So how does "I'm really bad at it" relate to the...

    So how does "I'm really bad at it" relate to the problem at hand?

    What exactly don't you understand?
  23. Replies
    4
    Views
    261

    Do you realize that in main() x and y are single...

    Do you realize that in main() x and y are single doubles, not two arrays of double as your function expects?
  24. Replies
    1
    Views
    225

    A couple of things, first in C you shouldn't be...

    A couple of things, first in C you shouldn't be casting the return value from malloc(), second what is "s"? Third did you look up some documentation for free, pay particular attention to what you're...
  25. Replies
    3
    Views
    200

    Okay, do you realize that that is what getch()...

    Okay, do you realize that that is what getch() should do?

    Also do you know that getch() is a non-standard function only available on certain compilers?

    Perhaps you should consider either...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4