Cant include CString?
in my C++ application
1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\statreg.h(157) : error C2059: syntax error : 'constant'
1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\statreg.h(157) : error C2238: unexpected token(s) preceding ';'
When I #include <atlstr.h> to use the CString class i get these errors.
If not it works fine but I cant create my CStrings... What settings must I change to fix?
Post your code.
Did you include windows.h before atlstr.h?
Do you include any of your own headers before including atlstr.h?
Did you include windows.h before atlstr.h?
Do you include any of your own headers before including atlstr.h?
#pragma comment (lib,"wininet.lib")#pragma comment (lib,"urlmon.lib")#include "DLLMAIN.h" // mine#include "Process.h" // mine#include <windows.h>#include <assert.h>#include "NT_DDK.h"#include <tchar.h>#include <atlstr.h>#include <vector>#include <iostream>#include <wininet.h>#include <stdio.h>#include <malloc.h>#include <memory.h>#include <urlmon.h>using namespace std;
how will i call the function from my other functions if I cant include any other headers to make it known?
This is a part of problem solving called a diagnostic. It tests to make sure that your installation is working properly. If you can't compile a source file that only contains the header then that means your installation is borked. If not, then you can move on to another problem solving step.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement