I'm trying to get my main function to read my class file. It doesn't compile.
Here is my main file:
#include<iostream>
#include<iomanip>
#include"countertype.h"
using namespace std;
void main(){
CounterType counter = CounterType();
counter.setCount(2);
counter.getCount();
}
And my class code:
#include<iostream>
#include<iomanip>
using namespace std;
class CounterType{
public:
int count;
CounterType(){
count = 0;
}
void setCount(int count){
count = count;
if(count<=0){
count=0;
}
}
int getCount(){
return count;
}
}
And my compiler errors:
fatal error C1083: Cannot open include file: 'countertype.h': No such file or directory Line 3
fatal error C1004: unexpected end-of-file found Line 27 countertype.cpp