Jump to content
  • Advertisement
Sign in to follow this  
RogerThat123

Cant include CString?

This topic is 3346 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
Post your code.

Did you include windows.h before atlstr.h?
Do you include any of your own headers before including atlstr.h?

Share this post


Link to post
Share on other sites
#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;

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!