Do not include source files such as "functions.cpp". functions.cpp should be a part of your project. chap2.cpp should include myfunctions.h.
There is no reason to include iostream or conio.h in myfunctions.h
main returns type int.
You should never include the line usingnamespace std; in a header file.
There is no reason for areaOfCircle to be qualified as inline unless it is defined in the header file.
I removed inclusion of "functions.cpp" from chap2.cpp and included the .h file. But still it was giving error. Then i removed the inline keyword from the .h and functions.cpp file and then it worked. Why is it so?
In functions.cpp, when you declared areaOfCircle as inline, that made it have a translation unit scope (only visible with functions.cpp). When you remove the inline, it became visible to other translation units at link time.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.