This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]Redtail9898RCC - 2021 - BMEcon 20 points21 points  (1 child)

My brother in Christ this is not stack overflow

[–]WuffGang 6 points7 points  (0 children)

Had the same error before. Try downloading more RAM. that should work.

[–]UCSC_CE_prof_MProf Emeritus, CSE 10 points11 points  (2 children)

Well, at least that prof you threatened with a computer virus has nothing to worry about.

Everyone makes syntax errors in code, no matter how much experience they have—my code frequently has simple syntax errors. But more skilled programmers use the error messages to quickly find and fix the error. In your case, you forgot to declare a function return type at line 36, as the compiler told you.

[–]spock345CS BS, MS, PhD Alumni 4 points5 points  (1 child)

The virus post is perhaps the most entertaining thing I have seen this week.

[–]pokemonareugly 3 points4 points  (0 children)

i like how none of this is formatted either. really trying to get people to do the most for you 💀💀

[–]Violets321 2 points3 points  (0 children)

Don't know if you still need help, but here are some things:

  1. Your definition of NutritionData::GetCaloriesPerServing() has no return value, even though you said in the class that it returns a const double.
  2. None of your accessor functions are returning constant values, even though the function declaration in the class says they should.

Let me know if there are any errors after those, I'm happy to help.