0

C++ Code Block

Hi! Can me someone help me to understand why I have by Code Block this problem #include "MyClass.h" #include <iostream> using namespace std; MyClass::MyClass() { } void MyClass::myPrint(){ cout<<"Hello"<<endl; } // After run I have this error >> ---Error: no member function "void MyClass :: myPrint ()" declared in class "MyClass" |--- Hi! I didn't make it, Do you know any if there is a helpful introduction on Youtube?

5th Aug 2020, 9:17 PM
Bbrbk
3 Respostas
+ 1
I recommend finishing sololearn's c++ course. It explains about operating with classes using multiple files.
8th Aug 2020, 5:03 AM
Aziz Nurhidayat
Aziz Nurhidayat - avatar
0
Dear friend you write class and do not declare function but write the definition. Just add void myPrint(); between class brackets in correponding h file
5th Aug 2020, 9:19 PM
george
george - avatar
0
Hi! Dear George I didn't make it, Do you know any if there is a helpful introduction on Youtube?
6th Aug 2020, 8:07 PM
Bbrbk