Kinda Suck with constructor

So in the video, I have followed what you said about creating a constructor.
When I go to right click on FBullCowGame(); and click definition to make the code in the FBullCowGame.cpp file it doesn’t make the code it just sits there in a state of confusion or something.

Image

So I then went and made the code myself and triple checked that it was ok but then it just didn’t wants to accept the cpp over the header files data for MyCurrentTry
Image

Any help would be great thanks

Same reason as:

1 Like

Anyone still has this issue? I have, and I don’t have anything like myCurrentTry in my reset method. It still doesnt work, nothing happens when I click on the constructor and choose Definition. I doesn’t do anything :frowning:

That would imply you don’t have a definition. What does your code look like?

1 Like

Here is my header file.

Is that enough or should I post everything?

The green line says you haven’t implemented the constructor. In the cpp file

FBullCowGame::FBullCowGame()
{
    Reset();
}

Isnt that created by right-clicking it then choosing Go to definition? Like in the video.

No, that would be create definition.

1 Like

Yeah it works now. Great! I did watch the video again though, and I never see the point where it is created, was that in a previous video? In this video, the option Go to definition is clicked.

Sorry for bothering you for such a small problem that Visual Studio even was prompting me about :slight_smile:

Privacy & Terms