Search:

Type: Posts; User: jimblumberg

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. What don't you understand? If you const...

    What don't you understand?

    If you const qualify a class member function that function can't modify any class member variable. The kind and number of parameters don't matter.
  2. Well actually all three forms are invalid because...

    Well actually all three forms are invalid because of the leading const without a type.

    The last two are only valid with class member functions. They both inform the compiler that neither of those...
  3. Replies
    17
    Views
    394

    Also what is the purpose of checking if the array...

    Also what is the purpose of checking if the array is sorted?

    If it is not sorted will you need to sort the array?

    If the array is not sorted in the correct way, will you need to sort the...
  4. Okay so where did you allocate memory for that...

    Okay so where did you allocate memory for that pointer?

    Also please don't edit your post to answer questions, post the new information in another post in the topic.
  5. My first question is: What is a String? Why...

    My first question is: What is a String?

    Why are you trying to write to a file that was opened in read mode?
  6. Replies
    5
    Views
    262

    It looks like you need an array of a struct to...

    It looks like you need an array of a struct to hold the information.The struct would have variables of the correct types for your data.
  7. For starters, global variables are usually...

    For starters, global variables are usually considered a bad practice, learn to pass those variables to and from the functions that need them.

    Initialize your variables when you declare them. And...
  8. Unless you're talking about a static or global...

    Unless you're talking about a static or global variable, not all compilers will initialize your variables in debug mode. Static and global variables are always default initialized.
  9. Or stick the code in a function.

    Or stick the code in a function.
  10. Replies
    2
    Views
    553

    The order matters. If the stream enters a fail...

    The order matters. If the stream enters a fail state no further processing of that stream can occur until the errors are cleared. This means that the clear() must be the first thing done.
  11. Replies
    3
    Views
    365

    What compiler/IDE are you using? It looks like...

    What compiler/IDE are you using?

    It looks like your compiler can't find the header file lib_string.h. Does the file exist? If it does exist where exactly is it located? Is it in the same directory...
  12. Replies
    4
    Views
    427

    Also please note that "stdlib.h" and "stdio.h"...

    Also please note that "stdlib.h" and "stdio.h" are header files, not libraries. These headers describe functions contained in the standard library.



    I'm not aware of any easy way to make a user...
  13. Did you even bother to read the previous posts? ...

    Did you even bother to read the previous posts?

    Also if you're getting an error you probably need to update your compiler and make sure it is using one of the modern standards.
  14. Also are you sure you have the correct operator? ...

    Also are you sure you have the correct operator?

    And are you sure that your equations are correct (ie ea > es or should it be es < ea)?
  15. Have you run the program with your debugger to...

    Have you run the program with your debugger to look at the values of the variables as you single step through the code?

    Why are you using C99 instead of C11?

    What version of gcc are you using?...
  16. Perhaps you need to assign a value to ea instead...

    Perhaps you need to assign a value to ea instead of trying to use an uninitialized variable?



    #include<stdio.h>
    #include<math.h>
    #include<iso646.h>

    int factorial(int n);
    void...
  17. Replies
    2
    Views
    338

    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?
  18. 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...
  19. 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.
    ...
  20. Replies
    11
    Views
    797

    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...
  21. Replies
    5
    Views
    600

    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...
  22. Replies
    5
    Views
    600

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

    If you're using full blown Linux then clang or gcc seem to fit.
  23. Replies
    55
    Views
    3,863

    Did you search your filesystem for that file?

    Did you search your filesystem for that file?
  24. Replies
    55
    Views
    3,863

    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...
  25. Replies
    55
    Views
    3,863

    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.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4