Even with a windows compiler, you are going about this the wrong way IMO
Easier way is to build the URL to search google with and call ShellExecute on it - like so
Code:
#include <windows.h>
#include <string>
#include <iostream>
int main()
{
std::string strGooglePath = "http://www.google.com/search?q=";
std::cout << "Enter what you want to search for" << std::endl;
char szToken[256];
std::cin.getline(szToken,255);
strGooglePath += szToken;
ShellExecute(0,"open",strGooglePath.c_str(),0,0,SW_SHOW);
return 0;
}