Hey, i'm kinda new to Visual C++ Express and i'm having a problem when I include iostream. I've installed Platform SDK and this is what I compile:
#include<iostream> using namespace std; int main(){
cout <<"Hello"; return 0; } I get tons of errors from this:
------ Build started: Project: empty_project, Configuration: Debug Win32 ------ Compiling... 2.cpp C:\Program Files\Microsoft Platform SDK\Include\stdio.h(103) : warning C4229: anachronism used : modifiers on data are ignored C:\Program Files\Microsoft Platform SDK\Include\stdio.h(104) : warning C4229: anachronism used : modifiers on data are ignored C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(43) : error C2632: 'char' followed by 'wchar_t' is illegal C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(48) : error C2059: syntax error : '(' C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(66) : error C2169: 'abs' : intrinsic function, cannot be defined C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(92) : error C2059: syntax error : '*' C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(92) : error C2091: function returns function C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(115) : warning C4229: anachronism used : modifiers on data are ignored C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(116) : warning C4229: anachronism used : modifiers on data are ignored C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(127) : warning C4229: anachronism used : modifiers on data are ignored C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(129) : warning C4229: anachronism used : modifiers on data are ignored C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(130) : warning C4229: anachronism used : modifiers on data are ignored C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(131) : warning C4229: anachronism used : modifiers on data are ignored C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(132) : warning C4229: anachronism used : modifiers on data are ignored C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(133) : warning C4229: anachronism used : modifiers on data are ignored C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(135) : warning C4229: anachronism used : modifiers on data are ignored C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(136) : warning C4229: anachronism used : modifiers on data are ignored C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(166) : error C4980: '__value' : use of this keyword requires /clr:oldSyntax command line option C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(166) : error C2059: syntax error : '__value' C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(169) : error C2059: syntax error : '__value' C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(174) : error C2059: syntax error : '__value' C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(175) : error C2059: syntax error : '__value' C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(178) : error C2059: syntax error : '*' C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(178) : error C2091: function returns function C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(185) : error C2059: syntax error : '*' C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(185) : error C2091: function returns function C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(186) : error C2059: syntax error : '__value' C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(194) : error C2059: syntax error : '__value' C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(195) : error C2059: syntax error : '__value' C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(197) : error C2059: syntax error : '__value' C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(198) : error C2059: syntax error : '__value' C:\Program Files\Microsoft Platform SDK\Include\stdlib.h(209) : error C2059: syntax error : '__value' C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : error C2143: syntax error : missing ';' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : error C2040: 'far' : 'int *' differs in levels of indirection from 'int' C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(84) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(85) : error C2143: syntax error : missing ';' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(85) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(85) : error C2086: 'int far' : redefinition C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(85) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(85) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(85) : error C2040: 'far' : 'int *' differs in levels of indirection from 'int' C:\Program Files\Microsoft Platform SDK\Include\string.h(85) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(85) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(85) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(86) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(86) : error C2086: 'int far' : redefinition C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(86) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(86) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(87) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(88) : error C2143: syntax error : missing ';' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(88) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(88) : error C2086: 'int far' : redefinition C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(88) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(88) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(88) : error C2040: 'far' : 'int *' differs in levels of indirection from 'int' C:\Program Files\Microsoft Platform SDK\Include\string.h(88) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(88) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(89) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(90) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(90) : error C2086: 'int far' : redefinition C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(90) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(90) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(91) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(92) : error C2143: syntax error : missing ';' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(92) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(92) : error C2086: 'int far' : redefinition C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(92) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(92) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(92) : error C2040: 'far' : 'int *' differs in levels of indirection from 'int' C:\Program Files\Microsoft Platform SDK\Include\string.h(92) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(92) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(93) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(94) : error C2143: syntax error : missing ';' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(94) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(94) : error C2086: 'int far' : redefinition C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(94) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(94) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(94) : error C2040: 'far' : 'int *' differs in levels of indirection from 'int' C:\Program Files\Microsoft Platform SDK\Include\string.h(94) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(94) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(94) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(95) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(95) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(95) : error C2086: 'int far' : redefinition C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(95) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(95) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(96) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(97) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(97) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(97) : error C2086: 'int far' : redefinition C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(97) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(97) : error C2182: 'far' : illegal use of type 'void' C:\Program Files\Microsoft Platform SDK\Include\string.h(98) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(100) : error C2143: syntax error : missing ';' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(100) : error C2371: 'far' : redefinition; different basic types C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(100) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(100) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(100) : error C2040: 'far' : 'int *' differs in levels of indirection from 'int' C:\Program Files\Microsoft Platform SDK\Include\string.h(100) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(100) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(101) : error C2143: syntax error : missing ';' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(101) : error C2371: 'far' : redefinition; different basic types C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(101) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(101) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(101) : error C2040: 'far' : 'int *' differs in levels of indirection from 'int' C:\Program Files\Microsoft Platform SDK\Include\string.h(101) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(101) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(102) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(102) : error C2086: 'int far' : redefinition C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(102) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(102) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(103) : error C2143: syntax error : missing ';' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(103) : error C2371: 'far' : redefinition; different basic types C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(103) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(103) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(103) : error C2040: 'far' : 'int *' differs in levels of indirection from 'int' C:\Program Files\Microsoft Platform SDK\Include\string.h(103) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(103) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(104) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(104) : error C2371: 'far' : redefinition; different basic types C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(104) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(104) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(105) : error C2143: syntax error : missing ';' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(105) : error C2371: 'far' : redefinition; different basic types C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(105) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(105) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(105) : error C2040: 'far' : 'int *' differs in levels of indirection from 'int' C:\Program Files\Microsoft Platform SDK\Include\string.h(105) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(105) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(106) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(106) : error C2086: 'int far' : redefinition C:\Program Files\Microsoft Platform SDK\Include\string.h(83) : see declaration of 'far' C:\Program Files\Microsoft Platform SDK\Include\string.h(106) : error C2143: syntax error : missing ',' before '*' C:\Program Files\Microsoft Platform SDK\Include\string.h(106) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Platform SDK\Include\string.h(107) : error C2143: syntax error : missing ';' before '__cdecl' C:\Program Files\Microsoft Platform SDK\Include\string.h(107) : fatal error C1003: error count exceeds 100; stopping compilation Build log was saved at "file://c:\Documents and Settings\Steve\My Documents\Visual Studio 2005\Projects\empty_project\empty_project\Debug\BuildLog.htm" empty_project - 128 error(s), 12 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I've been looking for a long time for the solution to this and any help would be appreciated. Thanks

Massive iostream errors
amar40
I agree with Christian. This should not require the Platform SDK at all.
(One way not to lose the PSDK search entry is to move it to the end of the list, then move it to the top again once we are clear the PSDK is not involved in this problem. I'm surprised this can't be controlled at the individual project level, but apparently it can't be.)
File | New | Project ...
with Project Type: General and Template: Empty Project
I just did that and it worked just fine.
dlawler
Sorry that didn't work either... I reinstalled VC++ EE and I tried the comand prompt way again but it still didn't work. I got:
Christian Friesnegg
That says the compiler is still accessing include files in the Platform SDK, if you get the same out put.
Try this:
In the VC++ IDE, select Tools | Visual Studio 2005 Command Prompt
In the console window that opens up, change directory to where your empty_project folder is. Or to where your source program, 2.cpp, is stored if not there.
Then execute the command
Does this get you a simple compile You should be able to produce something like this (but with your own project location):
If this doesn't work, I suggest that you uninstall and reinstall Visual C++ 2005 Express Edition. You don't have to remove the Platform SDK, but don't do anything to connect it into VC++ EE. After you confirm that you can work simple non-SDK C++ applications, we can then look at how to reconnect the Platform SDK without causing the problem you observed.
Hint: Do not follow the instructions in the video. The video has some misleading material on setting up the VC++ File References.
Surfsune
Snakiej
Sorry I didn't say this sooner... The errors are with the VC++ directory now:
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\INCLUDE\stdlib.h(48) : error C2059: syntax error : '('
Prasanth Menon
James Proctor
Mine says the same thing. If I put the directories that you mentioned to the top of the list... I don't get the errors anymore! But now.... I get some debugging errors. First I get:
Then I get a window that says:
If I say yes, nothing happens
rsk7
My VC++ 2005 Express Edition has no include files under the IDE folder.
The only include files you need for non-PSDK operation are in
C:\Program Files\Microsoft Visual Studio 8\VC\include
and I have no idea why your configuration is so different. I have nothing to offer about this. In the VC++ 2005 EE IDE, what is the version report that you click
Help | About Visual C++ 2005 Express Edition
Mine tells me I have
Microsoft Visual Studio 2005
Version 8.0 50727.42 (RTM.050727-4200)
What does yours say
Tadek
Uh, it looks like it did work. You didn't get any errors from the C compiler.
Did you look in general\general for the .exe
I can't see your command line. What did you type to have the compilation work
Did you try executing 2.exe after the compilation
You don't have to retype the console output manually.
You can save it to a file by using the command line
C:\...general\general> cl /EHsc 2.cpp >log.txt
This will store a log of the messages in the file log.txt (the compiler version information is all that appears on the console).
Then do
C:\...general\general> 2.exe
And you should get Hello on a new line and then another prompt on the next line.
Please confirm that. Really, it looks like it worked.
Developer 123
As iostream is part of the basic C++ library, I wonder if it's in the PSDK and there's two versions butting heads in your include list Is the PSDK first on your list I know you need the PSDK to write Win32 programs, but if you need the PSDK for iostream, then C++ Express is not a C++ compiler at all. I'd try removing the PSDK and see what happens.
Anyhow, "error C2632: 'char' followed by 'wchar_t' is illegal" means that you're mixing UNICODE and ASCII strings. Try putting an L in front of your strings, as in
cout << L"This is a wide string";
Or don't build your app as UNICODE.
alexrjs
There are so many things that change from report to report (2.cpp, then 1.cpp, then project.exe), I am concerned that we are not simplifying down to a stable reproducible case from which to expand with confidence. It's more like we're bounding all over the map.
I need to test some assumptions:
1. You are building single-file *.cpp programs.
2. You are not attempting to build projects that you got from elsewhere.
3. You are not attempting to make use of the Platform SDK or any of its samples.
4. You are starting from a simple project using Project Type: general and template: Empty Project.
5. You are using the Debugging configuration (the one that is the default for the new project).
6. If you go to Tools | Options | Projects and Solutions | VC++ Directories
6.1 The Win32 platform directories for Include files lists only the following entries and in this precise order:
6.2 The Win32 platform directories for Library files lists only the following entries and in this precise order:
6.3 Not all of these are required. They are the default options so let's start with them and nothing else.
Brian Schoenbeck
Interesting. If the error messages that you get are still like
and always begin C:\Program Files\Microsoft Platform SDK\Include\, then Microsoft Platform SDK is somehow still in the search path of the IDE builds and not in the command-line builds.
1. What is the date on the Platform SDK you are using Is it the April 2005 one (called the Windows Server 2003 SP1 SDK) or is it older than that
2. Here's my first proposal:
2.0 Delete the directory of project that you created (different than general/general) beneath your directory ...\My Documents\Visual Studio 2005\Projects
If there is anything in ...\My Documents\Visual Studio 2005\Templates
delete those files too. Likewise for anything in
...\My Documents\Visual Studio 2005\Settings\C++Express
and clean out anything no longer important in
...\My Documents\Visual Studio 2005\Backup Files
2.1 Uninstall Visual C++ 2005 Express Edition one more time.
2.2 After VC++ EE is removed, make sure there is no directory
C:\Program Files\Microsoft Visual Studio 8
and if there is, delete it completely (you will need to be administrator)
2.3 Reinstall Visual C++ 2005 Express Edition one more time.
3. Repeat the command-line example.
4. Try the IDE empty general application one more time.
This is to make sure any damaged settings files were completely removed along with the uninstall.
If that doesn't do it, there are a few other places to look. Others may also recognize the specific symptoms and can pitch in some suggestions here ( ).
rball
jizhang
With your re-installed VC++ 2005 Express Edition and without the Platform SDK, you should now be able to carry out this exercise successfully:
1. Start a completely new project:
1.1 Select File | New | Project ...
1.2 Use Project type: General and Template: Empty Project
1.3 Do not check "create directory for solution"
1.4 Use a different project name than "general".
1.5 After the project is created, use the Solution explorer.
1.6 Right click on the Source Files folder in the Solution explorer.
1.7 Select Add | Existing Item ...
1.8 Find your 2.cpp file and select it in the "Add Existing Item" dialog. (In the future, you will be using Add | New item for projects.)
1.9 You should now have a project that has linked in your 2.cpp (it has not been copied. VC++ will use it from where it was). For now, do nothing with it.
2. Build your project
Select Build | Build Solution (F7)
You should get a clean compile with an Output message like
3. Run your program (the .exe will be in the debug subdirectory of where you put your project) using Ctl+F5 (Debug | Start without Debugging).
This should provide you a basis for building standard C and C++ programs. You can work with a book on C++ and use most standard facilities of the C++ language.
Don't hook up the Platform SDK until you actually need it. I would work with a book like Ivar Horton's Beginning Visual C++ 2005 first. (My bibliography of recommendations on that and other books is here.)
When you are ready to use the Platform SDK (which is still installed on your machine), Use VC++ Help | Index and Look for: Platform SDK
Follow those instructions for hooking up the Platform SDK.
[Careful: There are bugs and omissions in the instructions for some samples. The simple ones usually work if you create an empty Win32 console application project and then add the files you want to use.]
I hope this is enough to get you over the initial speed bumps and you can now find your way around and discover other information as you need it.