Is there any downside mixing Objective-C with C++ for iOS apps?

I'd like to use C++ since it's fast and more dynamically in memory reference.
Is there any downside mixing Objective-C with C++ for iOS apps?
When googled for info, I only found tutorials about how to let xcode compile Objective-C with C++.
Thanks for help.

hokanst wrote:
Both Objective-C and C++ are (more or less) extensions of C.
C supports manipulation of pointers and casting of pointers, this implies that both Objective-C and C++ will be able to manipulate C data like arrays, structs ...
Objective-C has classes like NSData to read/write blocks of bytes from/to file and to access ranges of bytes when the data is loaded into memory.
C++ probably has similar classes (I'm not well versed in C++ so I don't know).
If you want to look into using C++ you will probably want to look at Objective-C++, the link below has links to docs on how to use C++ with Objective-C:
http://stackoverflow.com/questions/3684112/what-is-objective-c
Thanks for the info, NSData does what I need.
A replied in the link also mentioned that he's using C++ in his application too. As long as I'm aware of memory management (prevent memory leaks, etc) as @disguise said, it should be fine.
@etresoft indeed, but C is the base language of ObjC, there are ways to deal with.

Similar Messages

  • Is there any diffence in rendering websites with safari for windows and safari for mac os, or are both equal?

    Is there any diffence in rendering websites with safari for windows and safari for mac os, or are both equal?
    So is it necessary to buy a mac to guarantee that a website acts like it should, or is the Safari for Windows enough?

    So is it necessary to buy a mac to guarantee that a website acts like it should, or is the Safari for Windows enough?
    Pages render the same for Mac and Windows in Safari.

  • I am receiving excel files, which I need to convert with my macbook pro...I did this with export, but the file I got didnt show graphs as it should...can you help...do I need to buy excel for Apple computer, or is there any easier way of dealing with it..

    I am receiving excel files, which I need to convert with my macbook pro...I did this with export, but the file I got didnt show graphs as it should...can you help...do I need to buy excel for Apple computer, or is there any easier way of dealing with it..does App  "Numbers" help here?

    Numbers should be able to read Excel files without any problems.    If Numbers does not read the graphics properly then you can try Excel Online. https://office.live.com/start/Excel.aspx

  • I want to run Lexware on my imac and was told I need bootcamp / parallels for this. Are there any downsides to this?

    Hello, I need to run bookkeepting/ bill writing/ store management software on my imac and would like to use Lexware's German product (equivalent of Quickbooks), which can directly link to the German tax autorities. I was told I can do this from my imac via Bootcamp (they dont do a mac version).
    Is this advisable and are there any downsides? Is it simple enough? Do I need to be online to use the Lexware software (I live in the deepest countryside with a wobbly connection!).
    Thanks a lot for any hints or advice.

    There shouldn't be any issues as Boot Camp allows installation of Windows which runs natively just as if you were on a PC. The only downside is that you have to buy a Windows full install disk. Be sure it is the right version for your software.

  • Is there any way to contact verizon with a detailed cell phone technical support question?

    Is there any way to contact Verizon with a detailed cell phone technical support question?  I prefer e-mail so as to provide details (like I am trying to provide here).  I have tried in-store personnel (no help at all) and the web chat - they just want to see me more data instead of helping me with my basic problem!
    I CAN NOT GET ANYONE FROM VERIZON TO GIVE ME ANY HELP NOR CAN I FIND A WAY TO FILE A COMPLAINT.  AT THIS POINT I JUST WANT TO DROP MY VERIZON ACCOUNT BUT I'M SURE THAT IT WILL COST ME A SMALL FORTUNE TO GET OUT OF IT.
    Here is my issue:
    Chat transcript removed as required by the Verizon Wireless Terms of Service
    BELOW IS A SCREEN COPY FROM REDDIT ABOUT SOMEONE WITH THE SAME PROBLEM WITH A VERIZON CELL PHONE
    So last night my RAZR MAXX HD did something totally bewildering by spontaneously downloading 2.6 GB of data over the course of ~ 3 hours. Fortunately I was able to catch this problem before it ended up being really expensive, but I still exceeded my 2 GB data plan by 600MB.
    The Culprits:
    Reddit News Free: 160 MB foreground / 0.96 GB background
    Android OS: 0 MB foreground / 1.18 GB background
    Several unnamed applications: ~ 350 MB
    Screenshots:
    The massive data spike
    Android OS data usage
    Reddit News Free data usage
    Weird unnamed processes
    Detailed timeline:
    5:12 PM: Incident begins according to VZW data usage website (2.60410 GB used). This is around the last time that I used my phone at the laundromat before getting dinner and watching Game of Thrones.
    8:04 PM: 50% of data allowance used (txt msg)
    8:31 PM: 75% of data allowance used (txt msg)
    8:58 PM: 90% of data allowance used (txt msg)
    9:13 PM: 100% of data allowance used (txt msg)
    10:05 PM: Got the text messages and immediately put the phone into airplane mode
    10:30 PM: Took screenshots
    10:45 PM: Enabled wifi, installed Kaspersky premium. Scan returned no threats.
    11:00 PM: Left phone in airplane mode, went to sleep.
    The questions:
    What was the root cause of this issue? Did Reddit News freak out as a result of an esoteric bug or was my phone hacked?
    If this was a simple Reddit News bug, then why was the Android OS also trying to use such a massive amount of background data?
    What the hell are these unnamed numeric applications? I've inspected my process history and this is the first time they have ever attempted to use data.
    I'm pretty sure that I can explain this situation to Verizon and get out of having to pay additional data usage fees, but I would like to know more about the problem before I get in touch with them.
    all 13 comments
    best 
    [–]omgmrjmako/PA, deb/Carbon 3 points 1 year ago*
    All I can think is your phone may have background downloaded an OTA update, and you'd then be prompted with something like, "As update to your Android system has been downloaded, would you like to install it now?"
    I do find it very odd that the update would be 2.6GB. As a rough base, the CyanogenMod 10.1 firmware for your device is well under 200MB, so unless Verizon has a ****-ton of bloatware in the update, or it had to attempt to download multiple times for some reason, it may be a stretch.
    But doing a little homework, it looks like the Verizon Razr Maxx was updated to 4.1 in late March. Maybe they're still rolling it out in waves? Have you gotten the update yet?
    Edit: Aaaand I just noticed you appear to be running an AOSP-based ROM, which totally rules out a carrier update being sent out.
    Edit2: If you want to live dangerously, you could try running:
    #kill -9 12289
    That 12289 is the PID listed in your screenshot. But don't run that without fulling understanding the kill command.
    The ps command could also be of use, but probably not.
    permalink
    [–]lechnito[S] 2 points 1 year ago
    I can confirm that the phone is currently at 4.1.2 and that I wasn't prompted for an OTA update.The fact that both the Android OS and Reddit News processes were simultaneously using an extremely large amount of data is unlikely to be a coincidence... 
    permalink
    parent
    [–]omgmrjmako/PA, deb/Carbon 3 points 1 year ago
    That is very curious that the spikes happened at the same time.I'm curious. It may have put at least some of that 2.6GB somewhere. You could use a data visualizer tool to see if you can find it, which may lead to more clues. 
    permalink
    parent
    [–]lechnito[S] 2 points 1 year ago
    The largest directories are:
    DCIM: Normal looking photos (90,825 KB)
    Android: Primarily map cache data (64,846 KB)
    If it was downloading content then it did not significantly save content to storage. It's not like I have anything particularly sensitive on the phone, but the idea that it was uploading a snapshot of my data definitely makes me uncomfortable.
    permalink
    parent
    [–]omgmrjmako/PA, deb/Carbon 2 points 1 year ago
    Yup, Digital Camera IMages and videos.Somewhere in /sdcard/Android would be my guess as to where a mysterious file would be downloaded, but if it's only 64MB, and mostly map data, I'd safely rule it out.I'm sorry, but I'm stumped here.Edit: I should mention I don't think this is malware, because unless a malicious app gained superuser access, any data it used would show under it's own apk in the data usage list, not Android OS. 
    permalink
    parent
    [–]mistrbrownstone 0 points 1 year ago
    DCIM: Normal looking photos (90,825 KB)
    Was it trying to auto-upload pictures or video to G+?I ******* hate that.
    permalink
    parent
    [–]lechnito[S] 1 point 1 year ago
    Although I'm not really up to speed with the Android platform, I come from a UNIX background so I feel comfortable running commands. How do I pull up a bash terminal? Do I need to root the phone first? 
    permalink
    parent
    [–]omgmrjmako/PA, deb/Carbon 2 points 1 year ago
    There's a number of terminal emulators in the Play Store that work well. You don't need a rooted phone to get to the shell as your user, but any privileged command won't execute unless you can grant it permission from the Superuser app that is installed when you root the device. So you could probably do a ps -e, but not a kill -9. 
    permalink
    parent
    [–]lechnito[S] 1 point 1 year ago
    Got it. I downloaded a terminal emulator but unfortunately those processes no longer exist.Does Android keep a generic log of system level events like /var/log/syslog? 
    permalink
    parent
    [–]omgmrjmako/PA, deb/Carbon 2 points 1 year ago
    I don't think so, and I know you'd need superuser permission to read most of the files in /var/log anyway. I'm not super familiar with how Android does its logging, but I do know that the two files of interest are the logcat and dmesg. 
    permalink
    parent
    [–]sh0nuff 1 point 1 year ago
    Want to mention here that using your settings to set your data cap (set it on your billing day), then you won't go over again.Those text messages are really unhelpful, as they send out well after the data has been used. Chances are good you hit close to the 2GB mark before you received the bulk of the messages. 
    permalink
    [–]kindofabuzz -4 points 1 year ago
    Quit installing pirated apps. 
    permalink
    [–]lechnito[S] 1 point 1 year ago
    That's definitely not the case here; both my PC and and Android phone are free from pirated apps.

    You used the data.  Verizon can not see what it was sued for.  However your phone can see whats apps used the data.  go to settings-data usage- there will be a place that says data usage cycle.  line the dates up with your cycle.  then there will be a bar graph below that   extend bother white bars one all the way to the left and one all the way to the right.  after those are extended below that will be a list of apps,  there should be one that used over 2 gb and that will show you what app used that data in her purse

  • Is there any way to get ipad 2 mirroring (beta ios 5) to work with unicast?  The school won't enable multicast for traffic concerns on a many AP wireless network.

    I have the iPad 2 mirroring working in my classroom with my own personal wireless router and an apple tv 2.  We would like to deploy several iPad 2's to teachers for instruction, all using mirroring.  The school district wireless network available throughout the complex has many access points and has multicasting turned off.  They are afraid to enable it because of traffic concerns - many wireless devices all sending everything to every AP on the district wireless network.  Is there any way to come up with an acceptable solution (unicasting?) that will only route traffic to the devices connected to a single access point on the network (the same one the ipad 2 and apple tv are connected to) without sending it to all the access points on the district wireless network?  Short of every teacher having an independent wireless router in each of their rooms (which could still potentially interfere with the district wireless), I don't currently have a solution.   I've heard the network guys through around terms like multicasting, unicasting, igmp, etc.  I don't want to choke down the district wireless either, but there must be a solution to this.  I could easily see 40 teachers in the complex all using iPad 2s mirroring through apple tvs attached to projectors all going on at the same time, but there might only be 3 or 4 on each access point.

    I have the iPad 2 mirroring working in my classroom with my own personal wireless router and an apple tv 2.  We would like to deploy several iPad 2's to teachers for instruction, all using mirroring.  The school district wireless network available throughout the complex has many access points and has multicasting turned off.  They are afraid to enable it because of traffic concerns - many wireless devices all sending everything to every AP on the district wireless network.  Is there any way to come up with an acceptable solution (unicasting?) that will only route traffic to the devices connected to a single access point on the network (the same one the ipad 2 and apple tv are connected to) without sending it to all the access points on the district wireless network?  Short of every teacher having an independent wireless router in each of their rooms (which could still potentially interfere with the district wireless), I don't currently have a solution.   I've heard the network guys through around terms like multicasting, unicasting, igmp, etc.  I don't want to choke down the district wireless either, but there must be a solution to this.  I could easily see 40 teachers in the complex all using iPad 2s mirroring through apple tvs attached to projectors all going on at the same time, but there might only be 3 or 4 on each access point.

  • Is there any way to replace iPod4 with iPod5?

    Before two months I purchased iPod4. Is there any chance of replacing it with iPod5?
    If it is a case, then how much do I need to pay extra?

    Sell it; buy new one. There are no trade-ins at Apple.

  • Is there any way to fwd delete with mavericks?

    Is there any way to fwd delete with mavericks?

    Try Fn+Delete if you are asking about deleting characters to the right of typed text. Verified on TextEdit.

  • Is there any way to restore contacts with no backup?

    Is there any way to restore contacts with no backup on an iphone 4?

    You could only restore them if there was somewhere to restore them from.
    Have you failed to sycn them with your computer?

  • Hello, is there any way of having a reboot disk for lion that I'm downloading, like the one I have with snow leopard ?

    Hello, is there any way of having a reboot disk for lion that I'm downloading, like the one I have with snow leopard ?

    Once the Lion download is complete quit the installer and follow these directions. The file you need to make a boot disk disappears after you install Lion.
    Egg Freckles | Burning A Lion Boot Disc
    However, the Lion installation includes a recovery partition. It won't be of help if your entire HD dies but is very handy otherwise. This Knowledge Base article has a lot of good information about Lion's recovery partition.
    OS X Lion: About Lion Recovery

  • Mix object tables with relational tables?

    Hallo,
    is it possible to mix object tables with relational tables in one database?
    I didn't succeed in assigning a foreign key from a relational table to an object table.
    Is this only working with column objects in relational tables?

    Hi
    is it possible to mix object tables with relational tables in one database?
    Every database contains both types of tables. So, it is basically not a problem.
    I didn't succeed in assigning a foreign key from a relational table to an object table.
    Is this only working with column objects in relational tables?It would be interesting to know how you tried... e.g. what error you get... Here an example (executed on 11.1).
    SQL> create or replace type tt as object ( n number );
      2  /
    SQL> create table ot of tt (constraint ot_pk primary key (n));
    SQL> create table rt (n number, constraint rt_ot_fk foreign key (n) references ot (n));
    SQL> insert into ot values (tt(1));
    SQL> insert into rt values (1);
    SQL> insert into rt values (2);
    insert into rt values (2)
    ERROR at line 1:
    ORA-02291: integrity constraint (OPS$CHA.RT_OT_FK) violated - parent key not foundHTH
    Chris

  • Is there any way I can create a form for Muse that will integrate with their Python backend system?

    Attention Anyone that my be able to help PLEASE
    I have a client that I am building a website for in Muse and they have a backend system thru "Python" that I am guessing runs their information. So basically im asking is there any way I can create a form for Muse that will integrate with their Python backend system? Have any ideas? I really need a large form that will work with "Python"
    Thanks A Bunch!!! Dan

    ITBobbyP hi again,
    Excel formats are not backward compatible, you need to use the proper driver.
    Arthur
    MyBlog
    Twitter

  • Is there any restriction on DDL replication with 11.2.0.1 GG version on HP UNix

    Is there any restriction on DDL replication with 11.2.0.1 GG version on HP Unix

    Here is few:
    1. ALTER TABLE ... MOVE TABLESPACE
    2. DDL on nested tables
    3. ALTER DATABASE  and   ALTER SYSTEM  (these are not considered to be DDL)
    4. DDL on a standby database
    In addition, classic capture  mode does not support DDL that involves password-based  column encryption, such as:
    1.CREATE TABLE t1 ( a number, b varchar2(32) ENCRYPT IDENTIFIED BY my_password);
    2.ALTER TABLE t1 ADD COLUMN c varchar2(64) ENCRYPT IDENTIFIED BY my_password
    I would request you to check documentation. you can check that here:http://www.oracle.com/technetwork/middleware/goldengate/documentation/index.html
    -Onkar

  • Is there any downside to writing plain old log files?

    Hi all;
    We have our web & worker roles using log4net to write log files to disk. It works great where we then remote desktop in and go to the folder where they are and we've got exactly what we want - a daily log file for each worker.
    Is there any downside to this approach?
    Also, is there an easy way to have it delete all log files over a month old?
    thanks - dave
    What we did for the last 6 months -
    Made the world's coolest reporting & docgen system even more amazing

    hi dave,
    If you stored the log file on instances disk, you may get them using the RDP. But if you redeployed ,auto-scaled the cloud service, the log file maybe removed. So I don't recommend you storage the content on Azure instances disk.
    If you stored the log file on Azure Blob/Table storage (https://github.com/crossvertise/log4net.Appender.AzureBlobStorage/tree/master/TransactionLogger),
    you could view it using some tool,such as Azure server explore and Azure storage Explore. And Azure storage will backup your storage data well.
    >>Also, is there an easy way to have it delete all log files over a month old?
    If you storage on azure storage, the one approach is that you could remove it manually . Another approach is that you could create a service on your project. And then you could create a Job using Scheduler service (http://msdn.microsoft.com/library/azure/dn479785.aspx
    ).  If you don't like to use the Scheduler service, you could coding a delete log data or file method and execulted  this method every day.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I lost my iPhone in a paddock while working is there any way to track it with my iPad. I do not have find my phone set up on my iPhone?

    I lost my iPhone in a paddock while working is there any way to track it with my iPad. I do not have find my phone set up on my iPhone?

    Wendy059 wrote:
    I do not have find my phone set up on my iPhone?
    Then you can't.

Maybe you are looking for

  • How to add text to a polygon shape?

    I created a triangle: <Polygon Name="triangle_top" Points="0,0 130,0, 130,130" Stroke="Black" /> I would like to add text to it without adding a label. how should I do it?

  • Third time lucky

    Third RMA'd mobo worked when I hocked up everything for the first time including MS ps/2 mouse.  Thanks again to Jocko for all his help and patience. p.s. I see Tomshardware site says bios 1.4 is better for memory compatibility www6.tomshardware.com/

  • Purchase Order Error. PLANT

    Hi experts, when i am creating Purchase Order system asking me to enter PLANT.. i am maintaining materials in the xyz plant   . but system is triggering the plant also i am maintaining   . info records,  sourse list in the same plant... but when i ca

  • Can we able to drag images directly

    can we able to drag images directly in a pane or we have to put it on some label like components will all the mouse events will work when we can able to drag images directly, else when we drag from putting it on labels , will all the mouse events wil

  • VIDEO MOVIE MENU  FIFTH SCENE SELECTION DOES NOT SHOW

    IN ANY OF THE FIVE MENU SCREENS WHY? HOW DO I ADD THE VISIBLE MARKER TO CREATE THE FIFTH SCENE SELECTION FOR EACH SCENE SELECTION MENU. I HAVE FIVE SCENE SELETION MENUS WITH 5 OPTIONS FOR EACH ONE. I ADD THE MARKER BUT IT DOES NOT SHOW THE VIDEO CLIP