• 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
Re: Mixing ObjC and C++ STL on same ObjC source file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mixing ObjC and C++ STL on same ObjC source file


  • Subject: Re: Mixing ObjC and C++ STL on same ObjC source file
  • From: Dave Carrigan <email@hidden>
  • Date: Fri, 12 Sep 2008 07:45:14 -0700


On Sep 12, 2008, at 1:17 AM, Daniel Luis dos Santos wrote:

I have std::map *var as a member variable of the ObjC class.

Is this really how it's declared? std::map is a template, so you have to do something like:


  std::map<type1,type2>* var;

Or better yet:

  typedef std::map<type1,type2> my_map_type;

   ...

  my_map_type* var;

/Users/dlsa/code/Finema/trunk/LiquidSurfaces/src/CVDisplayPipeline.h: 20: error: using-declaration for non-member at class scope

I've verified that this is the error that I get if I don't specify a proper template. I also get the error if I neglect to #include <map>, so that may also be your problem.


--
Dave Carrigan
email@hidden
Seattle, WA, USA

Attachment: PGP.sig
Description: This is a digitally signed message part

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Mixing ObjC and C++ STL on same ObjC source file (From: Daniel Luis dos Santos <email@hidden>)

  • Prev by Date: Re: Mixing ObjC and C++ STL on same ObjC source file
  • Next by Date: Update the group & file list?
  • Previous by thread: Re: Mixing ObjC and C++ STL on same ObjC source file
  • Next by thread: Update the group & file list?
  • Index(es):
    • Date
    • Thread