Sign in to follow this  
Splinter of Chaos

Can objective C code modify c++ variables?

Recommended Posts

SDL on mac requires an objective c file to define SDL_main, or something. The one provided by SDL's mac devel package also sets up a rudimentary menu. I want that menu to be extended to modify some configurations that were previously only modifiable through a text file, parsed with c++ code.
Maybe i'm just not understanding, but when i google it, i get more results about including objective c in your c++ code than the other way around. Pretty new to obj-c so that might just be the problem.

So, for some example code, say i got this:
C++:AssociativeContainer c;
c["some string"] = "value";

The objective c code needs to call operator[] and set it to a string.

Share this post


Link to post
Share on other sites
Sign in to follow this