C++

Conway’s Game of Life in C++

gameoflife

A (rather crude) version of the Game of Life written in C++. You’ll need to compile it.

View the Source

Basic Compilation of a C++ Program

compile

If you are using Mac OSX or Linux, go to the folder where your cpp file is located in the terminal. On windows, you will need to install g++.

Assuming your source file is called main.app, and you want your output file to be called “hellos” then type the following:

g++ -o hellos main.cpp

To run it:

./hellos

Note: It is possible to compile the program without specifying the output file name but it will default to “a.out”:

g++ main.cpp

Additional compiler options can be found here.

From Java to C++: Similarities and Differences

After some fiddling with XCode and C++, I finally got it compiling my Hello World. To my pleasure, the syntax in C++ is somewhat similar with Java, but there are still many differences.

Read the rest of this entry »