Re: [Dev-C++] Problem with btree.h and tree.h
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2006-06-25 19:53:10
|
Note that the tree and btree classes are defined within the namespace aed.
Try writing
aed::tree<int> t;
instead of just
tree<int> t;
If you are new to c++, please google a bit about how to use namespaces in
C++.
/Per W
On Sun, 25 Jun 2006, Marcelo Tom=E1s Gentile wrote:
> Dear reader:
> I have a problem with the archives btree.h and tree.h. These I want them =
to use to program tree structures using devc++ (version 4 or 5). In a progr=
am that uses the archives, I include them within include, for example # inc=
lude <btree.h> or # include <tree.h>. Up to here the program compiles norma=
lly, but when, within main, in the main program, I write tree<int> b, I obt=
ain the following message of error: `tree' undeclared (first use this func=
tion). Send with this email these archives
> The program is
> /////////////////////////////////////////////////////////////////////////=
///////////////////////////////////////////////////////////////////////////=
//////////////////
> #include <stdio.h>
> #include <btree.h>
> #include <tree.h>
> #include <list>
>
> int main(int argc, char *argv[])
> {
> tree<int> t;
> tree<int> :: iterator n;
> btree<int> bt;
> btree<int> :: iterator m;
> system("pause");
> return 0;
> }
>
> /////////////////////////////////////////////////////////////////////////=
///////////////////////////////////////////////////////////////////////////=
///////////////////
>
> I ignore because the error message It would thank for an answer
> Thanks to read to me
> Greetings to all
>
>
>
>
|