LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-02-2003, 11:53 AM   #1
rajorshi
Member
 
Registered: Jun 2003
Location: Calcutta, India
Distribution: Slackware 9.0
Posts: 34

Rep: Reputation: 15
Question automatic header inclusion


hello all,
i use gcc 3.2 on my slackware 9.0 system. The problem is
when is use functions in C++ programs, say assert()
the compiler does not complain even if i do not include
the header file. (there must be some auto header
inclusion going on). However because of this silly
reason i often get a compile error in programming
contests.
Can i turn off this automatic header inclusion
so that the compiler flags errors ?

thanks in advance
 
Old 11-02-2003, 12:05 PM   #2
Kurt M. Weber
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 335

Rep: Reputation: 36
Why not just go ahead and include it anyway? It won't hurt anything, and it's the Right Way.
 
Old 11-02-2003, 02:29 PM   #3
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Try compiling with all warnings turned on:

G++ -Wall -pedantic -ansi [...]
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
.h File Inclusion in C++ Hady Programming 6 05-31-2005 08:24 PM
New ATI driver inclusion ryox03 Linux - Distributions 1 01-29-2005 07:09 PM
Failed opening '../main/mainconfig.php' for inclusion (include_path='.:/usr/local/lib ryancoolest Linux - Newbie 3 09-29-2004 09:10 PM
Odd kernel 2.6.6 inclusion vs. module support in Debian TemplaraPheonix Linux - Software 0 06-03-2004 08:25 PM
c header files in linux in place of header files in windows? harun_acs Programming 1 03-17-2004 02:24 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration