i made simple header in have function adds 2 ints compiler doesn't recognize after link header project , include it:
in alx.h:
#ifndef alx_h_ #define alx_h_ #include <iostream> int add(int a,int b); #endif /* alx_h_ */
in alx.cpp:
#include <iostream> #include "alx.h" using namespace std; int add(int a,int b) { return a+b; }
in test.cpp:
#include <iostream> #include "alx.h" using namespace std; int main() { int numb; numb=add(15,5); cout << numb; return 0; }
here properties of test : http://imgur.com/a/j5mxe
Comments
Post a Comment