Xcode C++ Web Applications Primer Tutorial

Xcode C++ Web Applications Primer Tutorial

Xcode C++ Web Applications Primer Tutorial

C++ is a very useful desktop programming language and we like the Xcode IDE on a MacBook Pro to look after C++ projects.

These days a simple desktop C++ program project is found under “Command Line Tools”, and that sort of makes sense because you end up with something that can be run via the MacBook Pro’s Terminal application in Linux.

Today we set up two classes …

  1. WebApplicationRecord class handling 3 char[201] data members …
    • webApplicationURL
    • tutorialWebApplicationURL
    • title
  2. WebApplication class with 2 int and WebApplicationRecord (respectively) data members …
    • webappsSoFar
    • **webapps

… the latter of which am sure you’ve guessed supervises the former, and as you’ve probably guessed the number of WebApplicationRecord (class) objects gathered during an execution is stored in webappsSoFar and the contents of those WebApplicationRecord (class) objects is contained in that **webapps pointer to a pointer (to a WebApplicationRecord (class) object), and as a lot of the readers will know or guess, the use of pointer to a pointer is a “red rag to a bull” sign that the memory required to organize all this is dynamically allocated. We actually ask the user how many WebApplicationRecord (class) objects the program can expect, and from that, use the WebApplication class method …


void setAside(int howMany) {
if (howMany == 0) {
webapps = new WebApplicationRecord*[100000];
} else {
webapps = new WebApplicationRecord*[howMany];
}
}

… to allocate the memory required.

We ask the user interactively for the WebApplicationRecord class data member information and want to thank this useful link for their char* safe_gets( char* result, int maxchars ) alternative to the old C function gets which is an improvement on std::cin (or its variations) in catering for a carriage return delimited string be stored in a char * variable.

And just so this “template” of an idea (hopefully for your expansion) has a little to “hang its hat on” we use some WebApplication “find” methods that return URL information, given a “title” input.

And so if you are a regular it is a bit of “channelling” of ideas from the recent PHP Themed Supervision Sixth Genericization Tutorial series of blog postings.

If you are into some C++ code you could try main.cpp and WebApplication.h as starting points.

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

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

5 Responses to Xcode C++ Web Applications Primer Tutorial

  1. I do agree with all of the ideas you’ve introduced in your post. They’re really convincing and can certainly work. Still, the posts are too brief for beginners. May just you please prolong them a bit from subsequent time? Thanks for the post.

  2. Wow, nice web site you might have here. I hope you will keep updating. Regards TJ

  3. Your blog is 1 of a kind, i really like the way you organize the topics.:รขโ‚ฌโ„ข-รขโ‚ฌยรขโ‚ฌหœ

  4. hello!,I love your writing very so much! proportion we keep in touch extra approximately your post on AOL? I need an expert on this area to resolve my problem. May be that is you! Taking a look forward to look you.

  5. It is really a nice and useful piece of info. I am happy that you just shared this useful information with us. Please keep us up to date like this. Thanks for sharing.

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>