Thursday, March 29, 2012

(re)learning C++

I haven't really used C++ since my undergraduate days -- I've mostly worked in Java recently.  Feeling nostalgic, I decided to refresh these particular skills.  I'll be using the freely available C++ IDE called Code::Blocks (available at and the tutorials at (where Code::Blocks appears to be recommended above Dev-C++).  Running the "Hello World" program was easy, but to stop the exiting immediately, I recommend adding an int "dummy" variable and a "cin" to the standard code, e.g.,

// my first program in C++

#include <iostream>
using namespace std;

int main ()
  int pauseVariable;
  cout << "Hello World!" << endl;
  cout << "Type something and press Enter to continue..." << endl;
  cin >> pauseVariable;
  return 0;
P.S. Figured out syntax highlighting thanks to except that (at the time of posting) "Edit HTML" is located under the Template menu in your Blogger dashboard.
P.P.S. Code::Blocks integrates nicely with the Simple and Fast Multimedia Library -