STL vector not working
STL vector not working
- Subject: STL vector not working
- From: Arthur Clemens <email@hidden>
- Date: Sat, 12 Oct 2002 01:27:50 +0200
Is it because it is late? I think I did this before, but now I cannot
find why my compiler has such a problem with reading C++ code within
Objective-C (Jaguar, August developer's tools plus update).
I am using some vector types as data members in a objective-c class,
basically like this:
@interface Database : NSObject
{
std::vector<int> _usedNumbersArray;
std::vector<int> _recycledNumbersArray;
}
So I include the vector header file:
#include <vector>
This gives me all sorts of errors:
Database.h:4: header file 'vector' not found
Database.h:23: undefined type, found `std'
Database.h:23: illegal declaration, missing `;' after `>'
Database.h:24: undefined type, found `std'
Database.h:24: illegal declaration, missing `;' after `>'
<built-in>:1:1: no macro name given in #define directive
If I use
using namespace std;
this does not help either.
Should I use a compiler flag?
Arthur Clemens
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.