#define vector BJvector

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
fabian.gerold
Posts: 15
Joined: Mon Aug 06, 2007 3:37 am
Location: Bauhaus University Weimar
Contact:

#define vector BJvector

Post by fabian.gerold »

Hello,
I have OpenSees included in my application. Therefore I included the OpenSees header files. In one of them is a define which makes me problems:
#define vector BJvector

In my own application I want to use an std::vector<...>
but the compiler gives me this error:
error C2039: 'BJvector': Is not an element of 'std'

Do you have an idea how to solve this?

Thank you very much.
fabian.gerold
Posts: 15
Joined: Mon Aug 06, 2007 3:37 am
Location: Bauhaus University Weimar
Contact:

Post by fabian.gerold »

ok, I figured out a solution: always include the OpenSees headers after all other includes, and only in cpp files. In header-files, just write the OpenSees class names instead of header file includes.
I'm not a very experienced developer, but I think it's dangerous overriding defines of std namspace (like #define vector BJvector).
Post Reply