Newbie problem with include files (old style vs new style)

Newbie problem with include files (old style vs new style)

Post by Janos Blaz » Mon, 11 Nov 2002 19:28:55



When I start my program with

#include <iostream>
using namespace std

#include "CORE.h"
using namespace CORE;
#include "geometry.h"

I get 10,000 error messages. But when I start it with

#include <iostream.h>

#include "CORE.h"
using namespace CORE;
#include "geometry.h"

which I used to do in the eghties, it works but the compiler (gcc 3.2)
insults me by saying that I was using deprecated headers.

Can somebody give me a hint?

TIA,
Janos Blazi

-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----

 
 
 

Newbie problem with include files (old style vs new style)

Post by John Harriso » Mon, 11 Nov 2002 19:38:48



Quote:> When I start my program with

> #include <iostream>
> using namespace std

> #include "CORE.h"
> using namespace CORE;
> #include "geometry.h"

> I get 10,000 error messages. But when I start it with

> #include <iostream.h>

> #include "CORE.h"
> using namespace CORE;
> #include "geometry.h"

> which I used to do in the eghties, it works but the compiler (gcc 3.2)
> insults me by saying that I was using deprecated headers.

> Can somebody give me a hint?

> TIA,
> Janos Blazi

Not without seeing, (a) some of the error messages and (b) some of the code
from the header files that is causing them. Pretty obvious I would have
thought.


john

 
 
 

Newbie problem with include files (old style vs new style)

Post by Troy S » Tue, 12 Nov 2002 05:44:35


I'm no C++ expert but I do believe a semicolon at the end of the first
"using" statement may clear up 1-2 of those 10,000 errors.

Troy


Quote:> When I start my program with

> #include <iostream>
> using namespace std

> #include "CORE.h"
> using namespace CORE;
> #include "geometry.h"

> I get 10,000 error messages. But when I start it with

> #include <iostream.h>

> #include "CORE.h"
> using namespace CORE;
> #include "geometry.h"

> which I used to do in the eghties, it works but the compiler (gcc 3.2)
> insults me by saying that I was using deprecated headers.

> Can somebody give me a hint?

> TIA,
> Janos Blazi

> -----------== Posted via Newsfeed.Com - Uncensored Usenet News
==----------
>    http://www.newsfeed.com       The #1 Newsgroup Service in the World!
> -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers

=-----
 
 
 

Newbie problem with include files (old style vs new style)

Post by John Harriso » Tue, 12 Nov 2002 06:36:23




Quote:> I'm no C++ expert but I do believe a semicolon at the end of the first
> "using" statement may clear up 1-2 of those 10,000 errors.

> Troy

Hah! Well spotted, no mind reading necessary.

john

 
 
 

Newbie problem with include files (old style vs new style)

Post by Junmi » Fri, 15 Nov 2002 09:24:15



> When I start my program with

> #include <iostream>
> using namespace std

> #include "CORE.h"
> using namespace CORE;
> #include "geometry.h"

> I get 10,000 error messages. But when I start it with

> #include <iostream.h>

> #include "CORE.h"
> using namespace CORE;
> #include "geometry.h"

> which I used to do in the eghties, it works but the compiler (gcc 3.2)
> insults me by saying that I was using deprecated headers.

> Can somebody give me a hint?

> TIA,
> Janos Blazi

Try to put all the header files first and then the using namespace statements.