• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
STL vector not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: STL vector not working
      • From: John Harte <email@hidden>
    • Re: STL vector not working
      • From: Todd Heberlein <email@hidden>
  • Prev by Date: Re: Carbon vs Cocoa arguments
  • Next by Date: Re: { Semi-Newbie } Inverse of +initialize?
  • Previous by thread: Re: Seattle??? [was Re: Toronto cocoa programmers?]
  • Next by thread: Re: STL vector not working
  • Index(es):
    • Date
    • Thread