Search:

Type: Posts; User: jimblumberg

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    6
    Views
    159

    Perhaps you posted this in the wrong sub-forum?...

    Perhaps you posted this in the wrong sub-forum? Perhaps you meant to post in the "Projects and Job Recruitment" forum?

    This is your project, you need to do the work.
  2. Replies
    15
    Views
    267

    Actually posting large programs is usually not...

    Actually posting large programs is usually not the "best", it would be better to post the smallest complete program that illustrates the problem.
  3. What compiler/IDE are you using? If you are...

    What compiler/IDE are you using?

    If you are using some version of CodeBlocks then you need to right click on the project in the Project Management folder, then select Build Options.

    I suggest...
  4. Then perhaps you need to set the compiler to use...

    Then perhaps you need to set the compiler to use the c11 standard, for a start.


    Also what about all those other problems I pointed out?

    Those printf() format issues need to be treated like...
  5. That code doesn't compile on my machine. Here is...

    That code doesn't compile on my machine. Here is what my compiler says:



    ||=== Build: Debug in chomework (compiler: gcc9-2) ===|
    //main.c|10|warning: no previous declaration for ‘removNb’...
  6. Replies
    9
    Views
    155

    That is because "%i" and "%d" are both for...

    That is because "%i" and "%d" are both for integer types, the difference being that the "%i" recognizes a leading zero as Octal.

    What version of the compiler are you using. Are you using a 32 or...
  7. Replies
    9
    Views
    155

    Most likely. As I said using the wrong specifier...

    Most likely. As I said using the wrong specifier for the type produces undefined behaviour, a very bad place to be since anything can, and usually will happen.
  8. Replies
    9
    Views
    155

    What compiler are you using? A decent properly...

    What compiler are you using?

    A decent properly configured compiler should be emitting a few warnings that need to be fixed, since using the incorrect format specifier for the type produces...
  9. That is correct. Basically you don't. If you...

    That is correct.


    Basically you don't. If you want to get multiple values from sscanf() you need to do it by adding specifiers and variables to place the information into.

    sscanf("%d%d",...
  10. Also posted here...

    Also posted here.
  11. Replies
    10
    Views
    314

    What do you think &z[i] is really doing? Hint...

    What do you think &z[i] is really doing? Hint it's not copying an array element from one array into another array.
  12. Actually this would probably be better: ...

    Actually this would probably be better:


    for(count = 3 ; count > 0 ; --count)
    // Or even better, just define the variable in the loop it's self.
    for(for int count = 3 ; count > 0 ; --count)

    ...
  13. Yes, and as presently coded it will do this...

    Yes, and as presently coded it will do this exactly once.
  14. Perhaps you need to "reset" count? Also this: ...

    Perhaps you need to "reset" count?

    Also this:
    printf("\nYou have had three tries and failed. The number was %ld\n", chosen); should be producing a warning. If your compiler is not warning you...
  15. Replies
    10
    Views
    257

    Actually this is only true if you are talking...

    Actually this is only true if you are talking about a "Hosted environment", in a non-hosted environment the startup function name, number of arguments, and function return type are all implementation...
  16. Replies
    10
    Views
    257

    The problem is that void tom() is a function...

    The problem is that void tom() is a function declaration not a cast.

    A good properly configured compiler would be at least warning you about the issues, and probably even emitting an error or two.
  17. Replies
    4
    Views
    167

    What exactly don't you understand? You create a...

    What exactly don't you understand? You create a "new" node, add some data to that "new" node then return the pointer to that "new" node, overwriting the previous pointer creating a memory leak.
  18. Replies
    4
    Views
    167

    Other than the memory leaks, what don't you...

    Other than the memory leaks, what don't you understand?
  19. Actually it is a pointer to a type product. You...

    Actually it is a pointer to a type product. You use the struct keyword to create a User Defined Type.


    It points to the location where that "product" resides in memory. The memory was allocated...
  20. What exactly don't you understand? No...

    What exactly don't you understand?


    No account is a pointer to a struct Name, Name has two data members, account_number (an int), and balance (a float).

    Do you know the difference between...
  21. You first need to assign memory to that pointer,...

    You first need to assign memory to that pointer, malloc() perhaps?
  22. Actually account is a pointer to a variable of...

    Actually account is a pointer to a variable of type Name that is uninitialized (no memory associated to that pointer) so both of those lines produce undefined behaviour.

    Is there a reason you're...
  23. Thread: 3-D arrays

    by jimblumberg
    Replies
    5
    Views
    151

    I really don't think the array will really do...

    I really don't think the array will really do what you want in the case given. And your sample array doesn't really match the data given.

    For example how do you know that the 5 students in the...
  24. Replies
    11
    Views
    462

    Check for missing semicolons in your code. ...

    Check for missing semicolons in your code.

    Also with most IDEs you should be using a project to compile your code.
  25. Replies
    15
    Views
    502

    What exactly are you expecting to print with the...

    What exactly are you expecting to print with the unsigned char 133?

    What operating system are you using, what compiler?

    If on Windows, what code page are you using?
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4