![]() |
|
#1
|
|||
|
|||
Is keyword extern is an ulternate for #includeIs keyword extern is an ulternate for #include?
Or is it possible for me to use a.c file in b.c using extern keyword. If yes what is the syntax. What is the difference in between these two. (If possible.). Advantage of one over the other? Poolan |
|
#2
|
||||
|
||||
|
Simple answer... no.
Definition: The keyword extern is used in a declaration to assert to the compiler that the definition for an object or function is in another compilation unit (or file). __________________
-Aaron |
|
#3
|
||||
|
||||
|
Quote:
File 1 may contain a global variable such as CPP / C++ / C Code:
File 2 needs access to varValues so you specify CPP / C++ / C Code:
The variable is now available in file 2. __________________
Cow: You're a lawyer too? Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase! |
|
#4
|
|||
|
|||
|
Then what does extern {"#include a.c"} means
|
|
#5
|
||||
|
||||
|
Quote:
__________________
Cow: You're a lawyer too? Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase! |
|
#6
|
||||
|
||||
|
I have never seen that syntax. In fact, I think that's impossible. The syntax for extern works in the form:
extern <identifier> __________________
-Aaron |
|
#7
|
|||
|
|||
|
Quote:
|
Recent GIDBlog
Flickr uploads of IA pictures by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] GUI programming with FLTK | dsmith | FLTK Forum | 10 | 03-Oct-2005 15:41 |
| [GIM][MODULE]Contact List | cable_guy_67 | FLTK Forum | 9 | 04-Dec-2004 12:19 |
| fltk-2.0 cvs | Plumb | FLTK Forum | 20 | 13-Nov-2004 07:10 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The