Looks like it's not quite finished

Remark the includes needed to create, show and write to the console.
Remark we use “try-catch” error handling.
I noticed you're using the potentially buggy code that everyone seems to find for adding a console and opening the standard handles. Casting the handles to long instead of intptr_t could chop the values in half on 64-bit Windows leaving them with the wrong values.
Also:
GeSHi (cpp):
GetConsoleTitle(static_cast<LPWSTR>(sConsoleWindowName), 1024);
hConsole = FindWindow(NULL, sConsoleWindowName);
[/url]
can be just
[source=cpp]
hConsole = GetConsoleWindow();
[/source]Created by GeSHI 1.0.7.18