I include the .h file in my main but when I try to use any of the methods of the class they are not implemented meaning they don't do anything. Any suggestions?
I'm assuming your .h is named projectile.h and your .cpp is named projectile.cpp. In your program's .cpp, usually main.cpp, you have #include "projectile.h" but aren't linking correctly to the projectile.cpp. This can happen if you're using a project and have forgotten to add the projectile.cpp file to the project.
Two solutions are possible:
1) Add projectile.cpp to the project so it's included in the linking (possibly wrong term)
or 2) add this piece of code to the bottom of your projectile.h file: #include "projectile.cpp"
This should correct your issue. I don't have a lot of experience with MSVS software though so you might need to add some more things in there. You should also research header guards to make sure you don't have multiple declarations/definitions.
When I include the .cpp in the main I get compiler errors:
Do not include the cpp in the main. You only need to make sure it is in your "project" or whatever it is your IDE calls it.
No, it compiles correctly but the methods do nothing when I execute it.
Only one of your methods has any code in, and it doesn't do anything you'll see. What did you expect to happen? What does it not do that you think it should do?
When I include the .cpp in the main I get compiler errors:
Do not include the cpp in the main. You only need to make sure it is in your "project" or whatever it is your IDE calls it.
It is in my project. I guess I should ask in a Visual studio forum about this.
No, it compiles correctly but the methods do nothing when I execute it.
Only one of your methods has any code in, and it doesn't do anything you'll see. What did you expect to happen? What does it not do that you think it should do?
I used to have more methods but I thought I f*cked something up in the .cpp file so I deleted both files and started fresh.
The constructor is supposed to set a Texture to the Sprite and then give it a position so it can be drawn on the screen. The code works fine if I put it in the main but it doesn't do anything when I create an object with the constructor or a any of the methods.