Help, Receiving Errors C2628,C2556,C2371, and E2844 During the "Including our own Header File" Lesson

My errors:

My FBCG.cpp:

My Header file:

I’ve mulled over Ben’s code in the video, and haven’t been able to spot any notable difference causing the errors, and I haven’t been able to find any answers online that I understood.

What I did try

  • Deleting my ‘FBullCowGame.cpp’ and recreating each of my blank definitions from my header file in a new ‘FBullCowGame.cpp’.

  • Placing ‘#pragma once’ at the beginning of my ‘FBullCowGame.cpp’

  • Moving the ‘void Reset()’ from the top (similar errors arose for the other types).

  • Placing a SemiColon after the ’ #include “FBullCowGame.h” ’

  • Changing the name of ‘void Reset()’ in each file

  • interpreting this thread [Help] Visual Studio PCH Error
    (i dont know what it’s referencing exactly, specifically how to get to project settings)

  • #include “stdafx.h” ’ at the top of each file
    (as suggested on some Stack Overflow page)

  • looking over the error overviews on the Microsoft website linked in VS17

I have a feeling this is something super simple I’m missing, and that this whole post is a little excessive, but some help would be great!

Ninja Edit:
Was able to resolve E2844, by changing from ‘Build with intellisense’, to ‘Build Only’

E2844 is secondary and because of other errors, so you can bring it back.
I see a missing semi-colon on line 15 in your class declaration - you have to put a ; at the end of class declarations.

That seems to have worked thanks for the help.

1 Like

Privacy & Terms