Search:

Type: Posts; User: jimblumberg

Page 1 of 20 1 2 3 4

Search: Search took 0.05 seconds.

  1. Yea the the links (other than the privacy link)...

    Yea the the links (other than the privacy link) seem to have permission problems, perhaps they are so old that they are no longer available for a "normal user".
  2. Did you try to run the program with your...

    Did you try to run the program with your debugger? The debugger should be able to tell you exactly where the problem is detected.


    By the way returning a pointer to a local variable may be part...
  3. Replies
    4
    Views
    412

    Have you considered using the "+r" mode? Some...

    Have you considered using the "+r" mode?

    Some documentation for the open modes of fopen.
  4. Replies
    10
    Views
    544

    No, in the scope you are misusing the scope...

    No, in the scope you are misusing the scope resolution operator the compiler thinks that ZERO_BALANCE is either a namespace, class or enumeration, hence the error message.

    Remember that C++ is...
  5. Replies
    10
    Views
    544

    What character is expected at the end of a case...

    What character is expected at the end of a case clause?

    Look closely at the lines referenced in your error messages.

    Do you know the different usage/meaning of the "::" sequence?
  6. Replies
    10
    Views
    544

    Please repost your code. Several of the error...

    Please repost your code. Several of the error messages tell you what to look for "expected ':' before ';' on the given line.

    Also in future cut and paste the error messages into a post, pictures...
  7. Replies
    10
    Views
    544

    You have a lot of misspellings, and typos,...

    You have a lot of misspellings, and typos, incorrect statement terminations, etc.

    For example that first error is being caused by a possible missing underscore.
  8. Probably not. It is most likely that the file...

    Probably not.

    It is most likely that the file is not in the current working directory.
  9. Replies
    5
    Views
    862

    I'd also suggest you start using C++ strings...

    I'd also suggest you start using C++ strings instead of the C-strings as a C++ string is much safer, and IMO easier to use.
  10. Replies
    5
    Views
    862

    Perhaps you meant to create buffer1 and buffer2...

    Perhaps you meant to create buffer1 and buffer2 as C-strings instead of as single characters?

    Lines 8 and 9 are creating single characters with the initial value of 80, not C-strings with a size...
  11. IMO, using high warning levels is something to...

    IMO, using high warning levels is something to recommend on most occasions.

    By the way I don't find the '=' versus "==" to be a hard to find bug, however setting your compiler to generate a...
  12. Replies
    17
    Views
    1,524

    I disagree, IMO, experienced programmers prefer...

    I disagree, IMO, experienced programmers prefer to have the compiler help "debug" the program. I usually use quite a few warnings when writing code, even though I will rarely have code that generates...
  13. Replies
    17
    Views
    1,524

    With gcc/g++ I would also suggest that you...

    With gcc/g++ I would also suggest that you specifically state the version of the standard you want to use, ie "-std=c++20" because by default gcc/g++ uses "-std=gnu++XX". I recommend sticking with...
  14. Replies
    17
    Views
    1,524

    Generally you should use the highest warning...

    Generally you should use the highest warning level your compiler supplies. The more warnings that are caught means the fewer potential problems you will have later.
  15. Do you know the difference between assignment "="...

    Do you know the difference between assignment "=" and comparison "=="?

    By the way your compiler should be able to help you solve this issue, insure your compiler is set up to generate warnings and...
  16. Replies
    7
    Views
    759

    Perhaps you want to print the value of each...

    Perhaps you want to print the value of each character?



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    int main(void)
    {
  17. Replies
    5
    Views
    789

    Do you realize that the "w" open mode erases all...

    Do you realize that the "w" open mode erases all the contents of the file?

    Perhaps you should consider using one of the "append" modes instead?

    See this link for more information.
  18. Replies
    4
    Views
    826

    Be careful when printing with printf(), using the...

    Be careful when printing with printf(), using the wrong type of variable for the format specifier can invoke undefined behavior. The "%p" specifier expects a void * so you need to cast your pointers...
  19. Replies
    4
    Views
    675

    Please show the text of your project...

    Please show the text of your project requirements.

    What exactly don't you understand?

    It seems to me that you're confusing yourself by using dynamic memory, so I'd recommend you start with the...
  20. Replies
    4
    Views
    675

    By the way there doesn't really seem to be a need...

    By the way there doesn't really seem to be a need for the array of your structure, because you are only writing a single instance, so just use a single instance.

    Something more like:




    ...
  21. How did you write your input file? Normally...

    How did you write your input file?

    Normally when trying to read a "binary" file you should first write the file using binary methods.
  22. Replies
    4
    Views
    892

    Why not just use sprintf() to convert the...

    Why not just use sprintf() to convert the "number" to a string? By number I mean something like 100983.

    Do you not understand that 41 (hex) already equals 65 (decimal) which is equal to the 'A'...
  23. Replies
    4
    Views
    892

    Convert the "number" to a string and then "send"...

    Convert the "number" to a string and then "send" each character of that string.
  24. Replies
    6
    Views
    1,137

    Well part of the reason for the current problem...

    Well part of the reason for the current problem is that memcpy() expects "destination" to be passed by "reference" not by "value". However where are you allocating memory for those pointers in your...
  25. Correct. Sort of. But this has nothing to...

    Correct.


    Sort of. But this has nothing to do with the arguments to main(), since the arguments of main() are not constants, they are variables.

    And you need to realize that C passes...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4