Search:

Type: Posts; User: jimblumberg

Page 1 of 20 1 2 3 4

Search: Search took 0.11 seconds.

  1. Replies
    5
    Views
    1,348

    Actually I'm not forgetting, I just consider VLA...

    Actually I'm not forgetting, I just consider VLA an abomination.
  2. Replies
    5
    Views
    1,348

    In C the sizes of arrays must be compile time...

    In C the sizes of arrays must be compile time constants. If you want to use non-compile-time constants for the array size you must use manual memory management with malloc/free.
  3. Replies
    6
    Views
    1,518

    That's because gets() is a very dangerous...

    That's because gets() is a very dangerous function that can never be used safely so the C standards committee has removed gets() from the standard so it is no longer available. fgets() is much safer...
  4. Replies
    6
    Views
    1,518

    KDevelop is an IDE and probably is using gcc as...

    KDevelop is an IDE and probably is using gcc as the compiler, I'm not sure what compiler VSCode is actually using on Linux.

    By the way, as already stated above, current versions of gcc are using...
  5. Replies
    4
    Views
    1,457

    I'd recommend that you use strtod() instead of...

    I'd recommend that you use strtod() instead of atof() which can silently fail.
  6. Also note that if(digTwo[ones-48]!="zero")...

    Also note that
    if(digTwo[ones-48]!="zero") produces Undefined Behavior, you can't compare two strings like that, you would need to use strcmp().
  7. Do you realize that you are overflowing the...

    Do you realize that you are overflowing the bounds of the "num" array when you enter more than one character?

    Remember that the "%s" specifier retrieves a string, automatically adding the end of...
  8. Replies
    4
    Views
    1,369

    Correct, C89 allowed "default" values, which...

    Correct, C89 allowed "default" values, which usually causes hard to find problems.

    Stick with one of the newer standards, (C11 or higher) these newer standards have removed several sources of some...
  9. Replies
    27
    Views
    6,446

    Please show the file contents you are trying to...

    Please show the file contents you are trying to "seek" through.

    Did your colleague use binary methods to write the file (like fwrite())?

    Trying to seek in a text file is very problematic. Text...
  10. Replies
    2
    Views
    1,492

    You should also turn up your compiler warnings,...

    You should also turn up your compiler warnings, you have several errors with your code.

    Before you worry about sorting the data you should insure that you have read the data correctly (print the...
  11. Replies
    1
    Views
    1,508

    You really need to show some actual effort to...

    You really need to show some actual effort to solve the problem.

    Start by opening the file and checking that the file opened correctly.

    You have all the basic steps listed, now you need to try...
  12. Replies
    5
    Views
    9,363

    The code you posted should not compile, as there...

    The code you posted should not compile, as there are several errors.

    You really should read the documentation for the standard functions you are trying to use. For example fgets() expects a FILE...
  13. You should also be checking to insure that you...

    You should also be checking to insure that you don't overflow the array bounds for the read.
  14. Replies
    4
    Views
    1,281

    Check your spelling, C++ is quite finicky about...

    Check your spelling, C++ is quite finicky about spelling, computerFeatures is not the same as computerFeature.
  15. Replies
    4
    Views
    1,281

    You've never defined a function named...

    You've never defined a function named computeFreatures().
  16. Replies
    2
    Views
    1,550

    It looks like you may need two functions named...

    It looks like you may need two functions named factorial(), one with one parameter, and one with two parameters.
  17. char* string = "ABCDE"; The above creates a...

    char* string = "ABCDE";

    The above creates a const character string which can't be changed hence the segfault.
  18. Since your file appears to have a "header" , you...

    Since your file appears to have a "header" , you will need to do something with this "data".

    Also it would be easier if your first true data item was not on the same line as the header.



    No ...
  19. Replies
    8
    Views
    3,057

    What exactly are the errors?

    What exactly are the errors?
  20. IMO, this depends on the type of data being...

    IMO, this depends on the type of data being collected. But I would say that for a single "chunk" somewhere around 256 mb would probably be a good starting place since your board only has 512 mb of...
  21. Poll: To my knowledge there is no moderator on this...

    To my knowledge there is no moderator on this board that is only a moderator on a single sub forum. All the moderators I'm aware of have moderation abilities on all the various sub forums.
    ...
  22. Poll: Perhaps you should look at the bottom of this...

    Perhaps you should look at the bottom of this thread and click on the "Contact us" "button", that seems like the easiest way to contact the people in charge to me.


    First salem is a site wide...
  23. Poll: I think the only thing I could fault anyone is...

    I think the only thing I could fault anyone is that it took so long to close the topic.

    By the way, why did you post this in the C forum? This has nothing to do with C programming problems. And...
  24. Why did you typedef that struct as a pointer? I...

    Why did you typedef that struct as a pointer? I really don't recommend hiding a pointer inside a typedef.

    Why all the horrible global variables?
  25. Replies
    6
    Views
    2,158

    I would suggest that you increase your compiler...

    I would suggest that you increase your compiler warning level, and fix all the warnings and errors in the code.

    Here is what my compiler is saying about the code in the OP:



    ||=== Build:...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4