Here's a rather hackish solution....
Code:
#include <stdio.h>
#include <windows.h>
#include <conio.h>
int main(void)
{
HWND hConsole = FindWindow(NULL, "title of my window");
ShowWindow(hConsole, SW_HIDE);
getch();
return 0;
}
//edit: Here's one that'll work no matter where your program is located (the title bar usually displays your program's location)
Code:
#include <stdio.h>
#include <windows.h>
#include <conio.h>
int main(int argc, char *argv[])
{
char tmp[50];
sprintf(tmp, "\"%s\"", argv[0]);
HWND hConsole = FindWindow(NULL, tmp);
ShowWindow(hConsole, SW_HIDE);
getch();
return 0;
}