Am trying to include CString in my cpp file but am getting this error if i include afxinet.h
“windows.h already included afxv_w32.h”
These are my header files :
#include stdafx.h
#include shlwapi.h
#include Tlhelp32.h
#include hooks.h
#include stdio.h
#include common1.h
#include SafeLogger.h
#include io.h
#include tinyxml.h
#include winsock.h>
#pragma comment(lib, “Ws2_32.lib”)
#include afxinet.h
I havent included the gaurds in stack to display here.
how to solve this issue and get to include CString in my file
Why are you adding
afxinet.hif you wantCString?You should include
atlstr.hto getCString– particularly if your project isn’t MFC based.