RE: [Dev-C++] Export keyword problem
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2002-06-14 02:06:37
|
> -----Original Message-----
> From: dev...@li...=20
> [mailto:dev...@li...] On Behalf=20
> Of Marcos Carrard
> Sent: Thursday, June 13, 2002 10:47 PM
> To: dev...@li...
> Subject: [Dev-C++] Export keyword problem
>=20
>=20
> Hi!
>=20
> The book C++ Primer, 3rd edition, Lippmann and Lajoie, speaks on two
> models of compilation: separation and inclusion. The separation model
> defines a function in a separate file and it becomes=20
> available with the
> keyword export. I tested this in the Dev and it did not work. The
> compilation result say that the export keyword is not valid and the
> linker don=B4t find my function definition. What I can make? The =
export
> keyword is not available?
export is for template functions.
For normal functions you provide the definition in a file, e.g.
void something(void)
{
// ...
}
and in the other files that you want to use that function you declare it
before its use (typically at the beginning of the file):
void something(void);
or extern void something(void);
which are both equivallent.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|