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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -