Go to Post So just stamp "GEEK" on my forehead - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 18-02-2006, 11:11
kevlarman kevlarman is offline
"why cant i install Linux?" guy
AKA: Roman Tetelman
None #0100
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Belmont, CA
Posts: 11
kevlarman is an unknown quantity at this point
Re: The silly syntax errors that won't go away!

actually the more traditional way to do that is
Code:
#ifndef _MY_HEADER_FILE_H_
#define _MY_HEADER_FILE_H_
//other stuff in the header goes here
#endif
and make sure that all variables are declared extern (and initialized in the .c file that owns them), otherwise each file will get its own copy of the variable.
EDIT:
forgot to mention that _MY_HEADER_FILE_H_ should be the name of the file it is in (in this case it would be myheaderfile.h), if two files have the same #define at the top, one will get ignored

Last edited by kevlarman : 18-02-2006 at 11:43.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C18 v2.4 -- Syntax error where there is no syntax error Joel J Programming 7 12-01-2007 17:27
Union Errors in AutoCAD indieFan Inventor 4 16-07-2004 12:54
PBASIC language syntax WizardOfAz Programming 14 30-04-2003 10:23
Digital inputs, bandwith, errors? Micah Brodsky Programming 7 20-01-2003 16:08
Specs full of errors??? Simon G Motors 1 20-01-2003 12:53


All times are GMT -5. The time now is 16:54.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi