Search:

Type: Posts; User: jimblumberg

Page 1 of 20 1 2 3 4

Search: Search took 0.04 seconds.

  1. 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...
  2. Replies
    4
    Views
    131

    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.


    ...
  3. 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?
  4. 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...
  5. Replies
    2
    Views
    98

    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...
  6. 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.
  7. Also posted here...

    Also posted here.
  8. 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.
  9. Replies
    4
    Views
    164

    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?
  10. Replies
    4
    Views
    164

    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?
  11. Replies
    1
    Views
    130

    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...
  12. Replies
    3
    Views
    151

    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...
  13. Or maybe this one...

    Or maybe this one even, or this one maybe?
  14. It is a single invalid int value.

    It is a single invalid int value.
  15. Also note that the space between the format...

    Also note that the space between the format specifiers is not necessary, ("%d%d") is adequate.
  16. What type of system is this LCD connected to? ...

    What type of system is this LCD connected to?

    It doesn't look like you're initializing the LCD properly for 4 bit operation. Re-check the data sheet for more information about proper...
  17. It's been a while since I played with an LCD but...

    It's been a while since I played with an LCD but if I remember correctly you have to repeat one of the commands twice (the first I think).
  18. Have you tried placing your "wait" between each...

    Have you tried placing your "wait" between each of the commands. When placing a LCD into four bit mode the timing is quite critical, and waiting for the LCD busy flag is not always reliable for the...
  19. The problem is that 1. scanf() leaves the end of...

    The problem is that 1. scanf() leaves the end of line character in the input buffer and 2. when using the "%c" format character leading whitespace is not skipped.

    To fix the problem you can either...
  20. Perhaps you should print the variable after you...

    Perhaps you should print the variable after you have the user enter the value?
  21. Replies
    6
    Views
    128

    First off do you realize that you're not printing...

    First off do you realize that you're not printing the address of *pointer but you're trying to print the address of **pointer?

    Perhaps you should see about increasing your compiler warning levels...
  22. Replies
    18
    Views
    691

    It's a friend function, not a true member...

    It's a friend function, not a true member function, more like an enhanced non-member function.


    Inline code can speed execution at the cost of larger executable so it is a trade off. And realize...
  23. Why do you need a distro that supports gcc9-2? ...

    Why do you need a distro that supports gcc9-2?

    Do you know that you can download almost any version of gcc source and compile it to run on almost any distro and that you can have multiple...
  24. Replies
    8
    Views
    183

    Why are you not using a project? Using...

    Why are you not using a project? Using Code::Blocks without a project is a very bad idea since you probably are not properly setting up the compiler options.

    I suggest you read the error/warning...
  25. Replies
    8
    Views
    183

    Does that code even compile, it doens't compile...

    Does that code even compile, it doens't compile for me:
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4