Search:

Type: Posts; User: jimblumberg

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    2
    Views
    126

    Do you know that is a C++ header that...

    Do you know that <fstream> is a C++ header that is not available in a C program?
  2. How many times are you trying to read the files?...

    How many times are you trying to read the files? It appears to me that you are trying to read each file more than once, without resetting the file flags and FILE*.

    You really should be checking...
  3. while (fscanf(input,"%lf %s %d %d %d", &ID, n,...

    while (fscanf(input,"%lf %s %d %d %d", &ID, n, &ELA, &Math, &Science) != EOF)
    ^ Possible buffer overflow error waiting to happen.
    ...
  4. Replies
    11
    Views
    509

    That's probably because you are not "syncing"...

    That's probably because you are not "syncing" your read and write operations properly.

    First it is usually a mistake to use EOF to control a data entry loop, remember that EOF is not set until...
  5. Replies
    5
    Views
    383

    You said you wanted open source on Linux, the two...

    You said you wanted open source on Linux, the two biggest players that meet that criteria are clang and gcc. There are probably others, some even listed in the link above that you can download and...
  6. Replies
    5
    Views
    383

    If you're using full blown Linux then clang or...

    If you're using full blown Linux then clang or gcc seem to fit.
  7. Replies
    55
    Views
    2,484

    Did you search your filesystem for that file?

    Did you search your filesystem for that file?
  8. Replies
    55
    Views
    2,484

    This is the C++ forum, and in C++ main() must be...

    This is the C++ forum, and in C++ main() must be defined to return an int. If you use a truly standard compliant compiler void main() is not allowed. And if you don't use a truly standard compiler...
  9. Replies
    55
    Views
    2,484

    True, but with some operating systems it must be...

    True, but with some operating systems it must be a very small positive integral value. And with C++ if no return value is supplied zero will be returned.
  10. Replies
    55
    Views
    2,484

    You'll need to post your code. However it is...

    You'll need to post your code. However it is telling you that your program returned a value other than zero, which usually indicates some kind of failure of your program.
  11. I hope "it argc" is a typo, it should be "int...

    I hope "it argc" is a typo, it should be "int argc".

    How exactly are you calling the program?

    What are your actual command line arguments?
  12. Do you realize that std::string.c_str(), returns...

    Do you realize that std::string.c_str(), returns a const C-string, which means that you can't modify that C-string?
  13. Replies
    5
    Views
    312

    Start by doing some research. Use your favourite...

    Start by doing some research. Use your favourite search engine, searching for something like "c string comparison" should give you a good start,

    By the way I'd judge about a 2 maybe 3.
  14. Thread: Struct.

    by jimblumberg
    Replies
    11
    Views
    309

    You need to show some actual effort, no one here...

    You need to show some actual effort, no one here is going to just give you the solution.


    Break the problem down to manageable chunks, don't try to solve the entire program in one go. I'd start...
  15. Thread: Struct.

    by jimblumberg
    Replies
    11
    Views
    309

    Why not? Explain yourself, your question really...

    Why not? Explain yourself, your question really doesn't make much sense. If you want more coherent answers you need to provide more coherent questions.

    Do you understand the difference between a...
  16. Thread: Struct.

    by jimblumberg
    Replies
    11
    Views
    309

    First thing I notice is that your structures...

    First thing I notice is that your structures contain no "strings" just some doubles, integers, and single character types.



    Second there are no "separators" involved in the structures, perhaps...
  17. Since sizeof is a compile time (except when...

    Since sizeof is a compile time (except when dealing with the horrible VLA) operator it really won't make much difference.
  18. Replies
    9
    Views
    860

    What did you change?

    What did you change?
  19. Replies
    9
    Views
    860

    First off why are you using the C-string...

    First off why are you using the C-string functions in the first place? Why not just use C++ strings and then directly compare the strings?

    Second I can't reproduce your results because the program...
  20. Replies
    11
    Views
    161

    What is the purpose of the program? What input...

    What is the purpose of the program?

    What input did you use that caused the program to crash?

    Why all the horrible global variables? You need to learn to pass variables to and from your...
  21. Replies
    11
    Views
    161

    Please post your current code, inside code tags.

    Please post your current code, inside code tags.
  22. Replies
    11
    Views
    161

    Do you see any if in that line? It either needs...

    Do you see any if in that line? It either needs to be a "bare" else or else if(pt[i].vp == vp). An else all by it's self has no conditions.
  23. Replies
    11
    Views
    161

    ---> else (pt[i].vp == vp) Again else...

    ---> else (pt[i].vp == vp)


    Again else statements have on conditions, the above should just be else.
  24. Replies
    11
    Views
    161

    The else statements have no conditions.

    The else statements have no conditions.
  25. Replies
    4
    Views
    243

    Well if you use the assignment operator= in an...

    Well if you use the assignment operator= in an if() statement the statement will always evaluate to true. If you use the comparison operator== it will evaluate to either true or false, depending on...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4