Having problems compiling....again....

cycleman77

Senior member
Jan 16, 2001
352
0
0
In a nut shell:

Here is the code:

#ifndef "NAND_H"
#define "NAND_H"

class NAND
{
public:
NAND();
void setBOTH(int, int);
void setONE(int);
void setTWO(int);
void outputZ();
int outTHREE;

private:
int inONE, inTWO;
};
#endif

And the error I get from Visual C++ is "fatal error C1016: #if[n]def expected an identifier"....

Anyone have any idea why I am getting this? I have the same set up for 3 other header files and none of the other ones are having this prolem.
Thanks
 

cycleman77

Senior member
Jan 16, 2001
352
0
0
I removed the quotes, but now I get the same error in another header file. I removed al the quotes from all of my define and ifndef commands and i still have the error.

 

cycleman77

Senior member
Jan 16, 2001
352
0
0
I got it working....thanks though...I do appreciate it.
I was working in one of the labs at school. When I came home and worked on my program, I didn't have the same errors as I did in the lab. I was able to finish off the program in 40 minutes compared to the 2 hours I wasted in the computer lab at school.
I wonder what the problem was. It shouldn't matter moving code from one machine to another, right?
Oh well....it works now.
Thanks again.
 

Glitchny

Diamond Member
Sep 4, 2002
5,679
1
0
Originally posted by: cycleman77
It shouldn't matter moving code from one machine to another, right?
.

Visual C++ has done thqat to me as well, for some reason something isnt linked right or set up properly on the school comp and u get goofy errors that if u move comps wont happen
 

cycleman77

Senior member
Jan 16, 2001
352
0
0
jonmullen: Yes I was using the same compiler. I was using Visual C++ and I am pretty sure it was the same version. If a new version has been released since last fall (I got mine last fall), then maybe school got it.

Nothinman: I copied the entire workspace along with all debug files, headers, and sourse files to a CDRW. When I took it to school I copied the entire directory to the local hard drive.

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Nothinman: I copied the entire workspace along with all debug files, headers, and sourse files to a CDRW. When I took it to school I copied the entire directory to the local hard drive.

Then the files should be exactly as you expect them to be, nothing should have changed in transit.