c++ - how to Separate Files Classes in Xcode -
i new c++ , have question separate files classes in xcode. did write program trying lean class, got error. teach me how right ?
i include program tried below
this (main ccp):
#include <iostream> #include "hhhhhhhhhhhhhhhh.h" using namespace std; int main ( int argc, char ** argv ) { bassam bo; bo.bassamfunction(); }
this (.h) :
#ifndef __try_some_concspte__hhhhhhhhhhhhhhhh__ #define __try_some_concspte__hhhhhhhhhhhhhhhh__ #include <iostream> class bassam{ public: void bassamfunction(); }; #endif /* defined(__try_some_concspte__hhhhhhhhhhhhhhhh__) */
this (ccp):
#include <iostream> #include "hhhhhhhhhhhhhhhh.h" using namespace std; bassam::bassamfunction() { cout << " heloo here "<< endl ; }
your problem bassam::bassamfunction()
has no return type in .cpp file. should changed void bassam::bassamfunction()
.
Comments
Post a Comment