473,226 Members | 1,309 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,226 software developers and data experts.

why does the complier complain undeclare identifier even though i have included the header file?

my project contains tens of files, it compiles well . now i need to add
several class implementation files to the project which are similar
with the classes already exist in
the project, so i add new files and copy the code from the exsited
files(sure need some
modification). but the compiler complains 'classxxx" undeclared
identifier.

Feb 10 '06 #1
3 1371
thinktwice wrote:
my project contains tens of files, it compiles well . now i need to
add several class implementation files to the project which are
similar with the classes already exist in
the project, so i add new files and copy the code from the exsited
files(sure need some
modification). but the compiler complains 'classxxx" undeclared
identifier.


This is covered in the FAQ. See 5.8 and 5.9.

V
--
Please remove capital As from my address when replying by mail
Feb 10 '06 #2
"thinktwice" <me*********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
my project contains tens of files, it compiles well . now i need to add
several class implementation files to the project which are similar
with the classes already exist in
the project, so i add new files and copy the code from the exsited
files(sure need some
modification). but the compiler complains 'classxxx" undeclared
identifier.


Most likely causes are mistyped class names (MyClass instead of myclass for
instance, MyClas for another instance), include files not included where
they should be, improper include guards (did you change the include guards
to match your header and make sure no other header used the same defines?).
Feb 10 '06 #3
In article <11**********************@o13g2000cwo.googlegroups .com>,
"thinktwice" <me*********@gmail.com> wrote:
my project contains tens of files, it compiles well . now i need to add
several class implementation files to the project which are similar
with the classes already exist in
the project, so i add new files and copy the code from the exsited
files(sure need some
modification). but the compiler complains 'classxxx" undeclared
identifier.


It's complaining because you haven't properly declared classxxx in the
context in which it is complaining about. I know that seems pretty
obvious, but there you go.

--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Feb 10 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Roy Yao | last post by:
Why the following code let my compiler complain an overloaded function Init()? // code begin template<class T> class BicircularList { template<class T> class Iterator; template<class T> class...
11
by: aleko | last post by:
This applies equally to function prototypes. Why do we have to tell the compiler twice? Other modern compiled languages don't have this requirement. Just curious, Aleko
15
by: Generic Usenet Account | last post by:
While I have a very good feel for how inlining works, I fail to see how in the world inlining can work if the inlined function is not described "in place" in a header file, but rather defined in a...
4
by: Stephen Corey | last post by:
I've got 2 classes in 2 seperate header files, but within the same namespace. If I use a line like: // This code is inside Class2's header file Class1 *newitem = new Class1(param1, param2); ...
14
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it...
14
by: webEater | last post by:
I have a problem, it's not browser specific, and I don't get a solution. I have an (X)HTML document, I show you a part of it: .... <!--<div class="pad">--> <div id="eventImages"><img src=""...
6
by: Hemant Shah | last post by:
Folks, Today, I was exporting a table in one database and then importing it in another database. The table in destination database was missing one column (my mistake while creating the table),...
92
by: Heinrich Pumpernickel | last post by:
what does this warning mean ? #include <stdio.h> int main() { long l = 100; printf("l is %li\n", l * 10L);
45
by: loudking | last post by:
Hello, all I don't quite understand what does ((time_t)-1) mean when I execute "man 2 time" RETURN VALUE On success, the value of time in seconds since the Epoch is retu rned. On error,...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.