compiler keeps saying class doesnt exist please help

its keeps saying thisclass.h is no such file or directory
please help

this is my main.cpp

#include <iostream>
#include "thisclass.h"
using namespace std;

int main()
{
thisclass tho(23)
tho.printstuff()
return 0;
}


this is my thisclass header

#ifndef THISCLASS_H
#define THISCLASS_H


class thisclass
{
public:
thisclass(int);
void printstuff();
private:
int h
};

#endif // THISCLASS_H


this the thisclass.cpp


#include "thisclass.h"
#include <iostream>
using namespace std;

hisclass::thisclass(int num)
:h(num)
{
}
cout << ""<< << endl;ttt
void thisclass::printstuff(){
cout << "h" << h << endl;
cout << "this->h" << this->h << endl;
cout << "(*this).h)" << (*this.h) << endl;
}


closed account (Dy7SLyTq)
look at the line under using namespace std on thisclass.cpp
yea i saw that and fixed it already
closed account (Dy7SLyTq)
are they all in the same folder?
yes
They must not be, or you wouldn't be getting that error.

Double check the directory to make sure that they're all there.

Then double check your project to make sure you are compiling the cpp file from that directory, and not a copy of it in another directory.
closed account (Dy7SLyTq)
oh hey the ide could not have added the files to the project
Topic archived. No new replies allowed.