C++ in Xcode on Mac OS X

I have begun dabbling some with C++, since a good part of my senior project is to be written in the language. Earlier today, I messed a bit with Microsoft Visual Studio 2008, which was fine. This evening, I wanted to mess a bit with Apple's Xcode, its free IDE. The following video was helpful in getting me started.

A Quirk When Writing C in BootCamp

I currently do most of my Windows work in a BootCamp partition on my Mac. This evening, while writing C code in Microsoft Visual C++ 2010 Express, I ran a program that reads the contents of a text file and displays them in console backwards, from EOF to start. The curious thing was each character was doubled. Why was this?

So I disabled the following code: Aha!

//for Mac
if (ch == '\r') {
else {

So the something is apparently still being recognized as Macintosh, even though I'm booted in Windows 7. Interesting.

C/C++ Compiler for iOS

While reading through my C textbook, C Primer Plus, I decided to search the iTunes Store for a C compiler; I was quite surprised to find one called C/C++ Compiler for $1.99. I bought it and promptly typed in two examples from my textbook. One crashed the compiler; the other identified an error (I forgot to return a value) and ran just fine.

Using the keyboard for input, such as entering your age to capture with scanf(), seems to cause runtime crashes. Yes, I have not read the documentation or support forums: I've had the program only a short time.

I don't envision doing much programming on my iPod, but it's neat to be able to do so for such a low price. Having a folding Bluetooth keyboard helps greatly.

Windows 7 Stuff

Beginning steps in Microsoft Visual C++ Express 2010, which is working well. It reminds of JBuilder, what I think the IDE that I used for Java was called. My current course is for C programming, which I will likely enjoy. Writing, debugging, and tweaking until success can ultimately be quite satisfying.

As I run Windows on my MacBook's Boot Camp partition, I've had to buy some antivirus and firewall software. I also installed Apache OpenOffice, which I've used for years on the Mac. Yet it is awkward to run both OSes on one machine, especially when I wish to jump from one to the other.