Xcode Debug C Strings Program Tutorial

Xcode Debug C Strings Program Tutorial

Xcode Debug C Strings Program Tutorial

Have a bit of an esoteric C programming scenario today, and because it is esoteric, and some or all of you may fall asleep, am also going to show you how to debug in Xcode … and only now just realized with the podcast of this tutorial that we went, on a Mac, control-command-Y a lot and should have, instead, shown you this in menu manipulation terms as Product->Debug->Continue … anyway, if you get into this, you’ll know what is going on.

Okay, so the C scenario in Xcode is a bit esoteric, as sometimes happens when you are answering “a brief” (a Yahoo Answers brief). The brief was not to use strcat in the making of a single string buffer from an array of zero-byte terminated char* strings in an array, with an added stipulation of a maximum string buffer length. Sounds simple, and it is if you use strcat and/or global strings, but my understanding of the brief would be that global variables will be frowned upon, as a lot of programmers will tell you. Mind you, personally, global strings are not a problem for me. Not using global strings and not using strcat, and making this work in a self-sufficient single function is quite interesting, and basically that is what we do here with this tutorial, via memory management using malloc & realloc.

So feel free to download the Xcode C programming source code here and rename it to main.cpp (or main.c … is pretty conservative in its construction … probably would work with Digital Mars C).

Hope you enjoy this tutorial showing you some cute Xcode debugging functionality.

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Tutorials, Xcode and tagged , , , , , , . Bookmark the permalink.

8 Responses to Xcode Debug C Strings Program Tutorial

  1. I merely had to thank you really much once once again. I’m not certain what I could possibly have followed within the absence from the type of tips contributed by you concerning my theme. It actually was a frightful difficulty for me, nevertheless finding out the incredibly professional manner you resolved the issue forced me to jump over joy. Now i’m thankful for your perform and even hope that you might be aware of an awesome job you’re accomplishing training individuals at this time thru your weblog post. I know that you’ve never got to know any of us.

  2. Pretty great post. I just stumbled upon your weblog and wished to say that I’ve truly loved browsing your blog posts. After all I will be subscribing on your feed and I’m hoping you write again very soon!|

  3. I like your writing style truly loving this web web site .

  4. national parks Kenya says:

    Nicely… to be definitely genuine, My partner and i had not been hoping to stumble upon this kind of information accidentally, as I did, for the reason that I not too long ago came across your weblog write-up whilst I used to become the truth is operating searching all through AOL, in search of some thing pretty close up having said that, not a similar… On the other hand at this time I will be more than satisfied for getting here and also I need to bring that the insight is particularly intriguing even though somewhat bit controversial towards the recognized… I’d personally say it’s as considerably as discussion… but I’m frightened to result in you to an opponent, ha, ha, ha… Nevertheless, for these who prefer to dicuss at length over it, you’ll want to response to my remark and also I will always sign up to ensure that I’ll be informed and are available back once more for much more… Your existing hopeful buddy

  5. bountiful says:

    I‘¦ve been exploring for a little for any high quality articles or weblog posts on this sort of house . Exploring in Yahoo I eventually stumbled upon this web site. Reading this info So i am satisfied to express that I’ve a very excellent uncanny feeling I found out just what I needed. I most certainly will make certain to don‘¦t forget this web site and provides it a look on a constant basis.

  6. Respect the posting you given.. So pleased to possess found this publish.. Extremely interesting perspective, appreciate your expression.. Is not it terrific whenever you find a superb post?

  7. check says:

    I enjoy you telling your viewpoint.. Love the admission you given.. Seriously good point of view, appreciate your writing.. So pleased to have discovered this submit..

  8. I would like to thank you for the efforts you have put in writing this blog. I’m hoping the same high-grade blog post from you in the upcoming also. Actually your creative writing skills has encouraged me to get my own blog now. Actually the blogging is spreading its wings fast. Your write up is a great example of it.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>