Search:

Type: Posts; User: jimblumberg

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds; generated 57 minute(s) ago.

  1. Replies
    15
    Views
    250

    It's a friend function, not a true member...

    It's a friend function, not a true member function, more like an enhanced non-member function.


    Inline code can speed execution at the cost of larger executable so it is a trade off. And realize...
  2. Why do you need a distro that supports gcc9-2? ...

    Why do you need a distro that supports gcc9-2?

    Do you know that you can download almost any version of gcc source and compile it to run on almost any distro and that you can have multiple...
  3. Replies
    8
    Views
    153

    Why are you not using a project? Using...

    Why are you not using a project? Using Code::Blocks without a project is a very bad idea since you probably are not properly setting up the compiler options.

    I suggest you read the error/warning...
  4. Replies
    8
    Views
    153

    Does that code even compile, it doens't compile...

    Does that code even compile, it doens't compile for me:
  5. Replies
    15
    Views
    250

    Because it is inefficient to "initialize" your...

    Because it is inefficient to "initialize" your class variables in the body of the constructor.


    At this stage of your journey you should treat all warnings as errors and fix them. Once you have...
  6. Replies
    15
    Views
    250

    Your "friend" definition doesn't match the...

    Your "friend" definition doesn't match the implementation, you have an extra "const" in the definition. My compiler actually had one other message that helped find the issue:



    Also be careful,...
  7. Replies
    15
    Views
    250

    Your "friend" definition doesn't match the...

    Your "friend" definition doesn't match the implementation, you have an extra "const" in the definition. My compiler actually had one other message that helped find the issue:



    Also be careful,...
  8. Replies
    5
    Views
    188

    So what seems to be the problem? Edit: Also...

    So what seems to be the problem?

    Edit: Also you should never, Never, NEVER use gets(). This function is so unsafe that it has been removed from the current C standard.
  9. In future please post the question outside of...

    In future please post the question outside of code blocks.

    That error is telling you that you need a constructor/destructor for your class. The constructor should take care of all of those...
  10. Replies
    7
    Views
    190

    Is it possible that in the computation of "b" you...

    Is it possible that in the computation of "b" you want to divide the first term by 5 + link.day, not just by 5?

    By the way you really should be using more descriptive variable and function names.
  11. Since left_val is a pointer you probably need to...

    Since left_val is a pointer you probably need to use pointer notation to access Node. You also don't need that "Node".

    Something like:

    newBranchNode->left_val->valueof;
  12. Replies
    12
    Views
    180

    Not all wrong, but still wrong. Yes an array with...

    Not all wrong, but still wrong. Yes an array with the size of 2 has elements of 0 and 1. However this means that there can only be one digit because you must terminate a string with the '\0'...
  13. Replies
    12
    Views
    180

    Yes you have but I was answering your question: ...

    Yes you have but I was answering your question:


    The answer is to name your parameters, then the the program has a chance of working.


    Well then you need to read the documentation for your...
  14. Replies
    12
    Views
    180

    Well your first code shouldn't even compile if...

    Well your first code shouldn't even compile if you are indeed using a C, not C++ compiler.

    You need to name the parameters in your function implementation in order to use them in the function.

    ...
  15. Replies
    2
    Views
    130

    In your function implementation you need to...

    In your function implementation you need to "name" that parameter.
  16. Replies
    11
    Views
    171

    Nope, for the first example, it means that the...

    Nope, for the first example, it means that the stream must contain an 's' right after a new line character (that s shouldn't really be in the format string).


    No it means process the next input...
  17. Replies
    11
    Views
    171

    What? The scanf() function can be used with...

    What? The scanf() function can be used with almost any number of parameters.


    Again, what? The using the [] retrieve input into one string per [] pair.


    Because you are retrieving how many...
  18. Replies
    11
    Views
    171

    Okay so then part of your confusion is "%9[^/]"...

    Okay so then part of your confusion is "%9[^/]" do you realize that the '[' ']' combination tells scanf() to retrieve a string, the %9 limits this string to 9 characters (including the required end...
  19. Replies
    11
    Views
    171

    Perhaps you should show an example of what you're...

    Perhaps you should show an example of what you're actually talking about?

    Something like the following perhaps?


    // read all whitespace, then store all characters up to a newline
    scanf("...
  20. Quite likely, since the program invokes undefined...

    Quite likely, since the program invokes undefined behaviour (line 9).

    Also beware of operator precedence with things like ++*P.
  21. Replies
    13
    Views
    353

    Please cut and paste your error messages into a...

    Please cut and paste your error messages into a post. That picture is not showing everything.
  22. Replies
    13
    Views
    353

    Okay, where is your code for main? Please cut...

    Okay, where is your code for main?

    Please cut and paste the code into a post (inside code tags), pictures tend to be harder to read.

    It would also help if you cut and pasted the error messages,...
  23. Replies
    13
    Views
    353

    As I said in my previous post this error is being...

    As I said in my previous post this error is being caused by #including that source file. You need be using a project and then add the .cpp files to your project for compiling.


    Did you add the...
  24. Replies
    13
    Views
    353

    What exactly is this compile error? Also...

    What exactly is this compile error?

    Also #including a .cpp file is usually a mistake. You should add the .cpp files to your project to be properly compiled, not #included.
  25. Also since you're using scanf() with the "%s"...

    Also since you're using scanf() with the "%s" format specifier your variable will only contain one "word". If you want multiple words you will need something like fgets(). Also you should be using...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4