Can't see typedef

Hi people!
I have this program, and I have problem with it...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// File: fs.h
/*...*/
struct Entry {
	char name[FNAMELEN];
	char ext[FEXTLEN];
	char reserved;
	unsigned long firstCluster;
	unsigned long size;
};
typedef Entry Directory[ENTRYCNT];
/*...*/
class FS{
/*...*/
static char readRootDir(char part, unsigned long n, Directory &d)
{return myImpl->readRootDir(part,n,&d);}
/*...*/
KernelFS* myImpl;
};


1
2
3
4
5
6
7
// File: kernelfs.h
#include "fs.h"
class KernelFS{
/*...*/
static char readRootDir(char part, unsigned long n, Directory &d);
/*...*/
};

In this bold line of code I got an error: error C2061: syntax error : identifier 'Directory'.

The same thing happened when I had
1
2
typedef unsigned long BytesCnt;
typedef unsigned long EntryNum;

in fs.h. Any other file couldn't "see" those types.

Btw, class FS was provided by my college professor, and the other students were able to use it. What's the problem with me? :)

I'm using Visual Studio 2008.

Edit: Here's the list of all the errors:

char FS::readRootDir(char part, unsigned long n, Directory &d) {return myImpl->readRootDir(part,n,&d);} // fs.cpp
Error: 'KernelFS::readRootDir' : function does not take 3 arguments
char readRootDir(char part, unsigned long n, Directory &d); //kernelfs.h
Error: syntax error : identifier 'Directory'
char KernelFS::readRootDir(char part, unsigned long n, Directory &d) {.... //kernelfs.cpp
Error: char KernelFS::readRootDir(char,unsigned long,Directory (*))' : overloaded member function not found in 'KernelFS'
char FS::readRootDir(char part, unsigned long n, Directory &d) {return myImpl->readRootDir(part,n,&d);} // fs.cpp
Error: 'KernelFS::readRootDir' : function does not take 3 arguments
Last edited on
Topic archived. No new replies allowed.