c程序调试出现错误,怎么解决?
//------begain from-------//#include"stdafx.h"
#include"windows.h"
#include
#include"stdio.h"
#include"stdlib.h"
#include"string.h"
void CheckIP(void)
{
WORD wVersionrequested;
WSADATA wsaData;
char name[255];
CSrring ip;
PHOSTENT hostinfo;
wVersionRequested =MAKEWORD(2,0);
if(WSAStartup(wVersionREQuested,&wsadata)==0)
{
if(gethostname(name,sizof(name))==0)
{
if(hostinfo =gethostbyname(name))!=NU;;)
{
LPCSTR ip = inet_ntoa(*(structin_addr*)*hostinfo->h_addr_list);
printf("%s\n",ip);
WSACleanup();
}
}
}
}
int main(int argc,char*argv[])
{
CheckIP();
return0;
}
调试出现这个问题:d:\microsoft visual studio\vc98\atl\include\atlbase.h(15) : fatal error C1189: #error : ATL requires C++ compilation (use a .cpp suffix)
Error executing cl.exe.
不知道怎么解决