I'm going to start a project with an ODBC datasource for a friend and I decided to use ATC for this (Homer's tutorial made sense to me :) )

Here is a quote from another thread from the OOP section.

Static and dynamic DATA fields in classes is a topic best handled in a separate reply, I'd be happy to elucidate on the difference, if you are interested let me know.

Yes, please do. If you can give me an piece of code to demonstrate these data fields, that would be great.
Posted on 2005-02-19 19:21:34 by Jurgen
Static data fields are defined in classes as in the following simple example:

class ExampleClass, ,C++ compatible
void SomeMethod
long dwExampleDynamicData
static dwExampleStaticData dd 0

The macro "static" simply defines a named dword variable in the .data segment with a prepended ClassName_VariableName.
We could have simply defined by hand:

ExampleClass_dwExampleStaticData dd 0

So that's all there is to class static data: it's merely a global dword which is accessible by all instances, or any other code for that matter.
No magic here, but useful place to define class-specific globals to make your classes more portable between implementations.
Posted on 2005-02-20 01:54:47 by Homer