PDA

View Full Version : objective-c version of stl?


tdog
06-10-2003, 02:56 PM
I'm finding that combining the c++ stl libraries and objectve-c is not so simple.

Is there a directive for the compiler I can issue to mix c++ and objective-c?

Or better still does someone know of an objective-c equivalent for the <stack> class in the stl distribution? Something like NSStack, which does not exist. I've tried NSArray, however I want to create a stack of floats not objects and push()/pop() them from the stack.

aogail
06-10-2003, 06:02 PM
I found a couple resources for info on Obj-C++:

Obj-C++ tutorial with sample source. (http://cs.northwestern.edu/~josha/objcpp.htm)
Apple's Obj-C++ Release Notes. (http://developer.apple.com/techpubs/macosx/ReleaseNotes/Objective-C++.html)
C++ in Obj-C section of Apple's Obj-C reference. (http://developer.apple.com/techpubs/macosx/Cocoa/ObjectiveC/3objc_language_overview/chapter_3_section_11.html)

tdog
06-10-2003, 06:32 PM
Hey this helps. Thank you. From reading your suggestions I found that just by changing my file from main.m to main.mm and recompiling solves the problem.

Thanks again.