Code Highlighter

This uses my custom script for highlighting all the code snippets on my site. It only handles C, CSS, HTML, JavaScript, and Ruby for the moment. For HTML, inline CSS and JavaScript are handled correctly.

See your highlighted code here

// C++

#include <cstring>
#include <iostream>
#include <stdio.h>

#define MAXIMUM 5
#define min(a, b) a < b ? a : b

int myNum = 0;
char myCharacter = '!';
std::string myWord = "world";

int incrementNumber( int numIn ) {
  return numIn++;
}

void sayHello() {
  std::cout << "Hello, " << myWord << myCharacter;
  std::cout << std::endl;
  myNum = incrementNumber( myNum );
  std::cout << myNum << " greeting.";
  std::cout << std::endl;
}

int main() {
  int countInput = std::cin;
  int count = min(countInput, MAXIMUM);

  for (int i = 0; i < count; i++) {
    sayHello();
  }

  return 0;
}