[geos-devel] Re: Building GEOS on Windows
HA
hadev at altern.org
Fri Jan 30 15:21:11 EST 2004
Swapna kv wrote:
> There was another error with the declaration
> static const int DEFAULT_QUADRANT_SEGMENTS =6
> Don't know why. But managed it with a #define.
>
The constant declaration
|class A|
|{|
| static const int MY_CONSTANT = 1;|
|};|
is very Java-like. I did not know it would compile with C++ (I does not,
in fact, with VC6, but I guess it does with the compiler GEOS team
uses...). I indeed forgot to mention in my previous mail that I modified
all constant declarations as follow:
In .h file:
|class A|
|{|
| static const int MY_CONSTANT;|
|};|
In .cpp file:
|const int A::MY_CONSTANT=1;
|
That's the way it is coded usually in C++ (do not use a #define, it's
so, well, old-fashioned).
Regards,
Hervé
||
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20040130/1f56166c/attachment.html
More information about the geos-devel
mailing list