Programming Thread

Viewing single post

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

ethomaz

For some reason, I'm having issues with C++.

Defining something in the .h file works perfectly.  Defining it in the cpp file stops working. 
I don't get at all what you are saying... in easy terms I use:

myclass.hpp // declaration of my class
myclass.cpp // my class body code with #include "myclass.hpp"
main.cpp // my main programs with #include "myclass.hpp"

I can use myclass in main.cpp fine doing this way.