i have three seperate files, one is testcode.cpp, another is Cat.h and lastly Cat.cpp
im trying to create an object of class Cat and make it meow but im getting an error that i dont know how to fix. any ideas?
<
#include <iostream>
#include "Cat.h"
using namespace std;
int main(){
Cat kitty;
kitty.speak();
return 0;
}
>
from testcode.cpp
<
#ifndef CAT_H_
#define CAT_H_
class Cat {
public:
void speak();
};
#endif /* CAT_H_ */
>
from Cat.h
<
#include <iostream>
#include "Cat.h"
using namespace std;
void Cat::speak(){
cout<< "meow" << endl;
}
int main(){
}
>
from Cat.cpp
the error is attached