I have to write something in C++. I've trouble with virtual functions.

For instance, in header file Human.h I've this:

class Human



In Human.cpp file I've this:

#include<iostream>

#include "Human.h"

int Human::Age()



I recieve these compile errors:

Error    4    error C2371: 'Human::Age' : redefinition different fundamental types    c:usersjandesktoptestctestchuman.cpp    5    1    TestC

Error    3    error C2556: 'Human Human::Age(void)' : overloaded function differs only by return type from 'int Human::Age(void)'    c:usersjandesktoptestctestchuman.cpp    5    1    TestC

Error    2    error C2628: 'Human' then 'int' is against the law (have you forget a ''?)    c:usersjandesktoptestctestchuman.cpp    4    1    TestC

You've forgotten to finish the category definition having a

It will read

class Human



This would result in the error disappear. Also, always browse the compiler's output: Error 2 error C2628: 'Human' then 'int' is against the law (have you forget a ''?) c:usersjandesktoptestctestchuman.cpp 4 1 TestC