Re: Compiler can't see class
- From: "Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp>
- Date: Sun, 29 Jan 2006 23:31:20 -0500
Lilith wrote:
I've trimmed the first part of each line for viewability.
error C2065: 'CMiniExcel' : undeclared identifier error C2146: syntax error : missing ';' before identifier 'MyExcel' error C2065: 'MyExcel' : undeclared identifier
I assume that the first error promotes the second two.
I've tried with another spreadsheet class (CSpreadSheet) I downloaded from Code Project with the same predicatable results in that I didn't change my approach. I've also tried declaring the class object in XXXView.cpp with no luck.
Presumably you have something like a MiniExcel.h header file. You must #include "MiniExcel.h" in any source file that uses the symbol CMiniExcel. Think of the compiler as reading each source file from top to bottom. It must (must!) encounter the #include that declares the class before it encounters any use of the class.
-- Scott McPhillips [VC++ MVP]
.
- Follow-Ups:
- Re: Compiler can't see class
- From: Lilith
- Re: Compiler can't see class
- References:
- Compiler can't see class
- From: Lilith
- Re: Compiler can't see class
- From: Frank Hickman [MVP]
- Re: Compiler can't see class
- From: Lilith
- Compiler can't see class
- Prev by Date: Re: Compiler can't see class
- Next by Date: Re: Damage of physical memory and hard disk
- Previous by thread: Re: Compiler can't see class
- Next by thread: Re: Compiler can't see class
- Index(es):
Relevant Pages
|