Archived

This topic is now archived and is closed to further replies.

Problems with Visual C++ 6.0

This topic is 5596 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

Hi, I just installed Visual C++ 6.0. The first thing is that I don''t seem to have access to the MSDN, which is a real pain becaues I can''t access the help files etc. Second, I made a new cpp file, with a simple "Hello World" program, and it''s spitting all these errors when I try and run it. I''ve come from Java and familiarised myself with all the new C++ features, which I''ve learned with Borland''s free command line compiler. With Visual C++, I wrote the following small program, and got the following 4 errors. What the hell is going on here? <#include iostream.h> int main() { cout << "Hello"; return 0; } Compiling... vics.cpp C:\temp\vics.cpp(1) : error C2143: syntax error : missing '';'' before ''<'' C:\temp\vics.cpp(1) : error C2014: preprocessor command must start as first nonwhite space C:\temp\vics.cpp(4) : error C2143: syntax error : missing '';'' before ''{'' C:\temp\vics.cpp(4) : error C2447: missing function header (old-style formal list?) Error executing cl.exe. Can I download the MSDN from anywhere? Is it free?

Share this post


Link to post
Share on other sites

  
#include <iostream>
//your <> was in the wrong spot and you should take out the .h


int main()
{
std::cout << "Hello";
return 0;
}
//you can put in "using namespace std;" under the include if you want, to save you from having to type "std::" for every cout statement.



------------
The Audacious Engine - After briefly disappearing (aka being deleted), Audacious is being rebuilt. Although it''s not ready yet, so don''t you dare go there. I mean it.
MSN: nmaster42@hotmail.com, AIM: LockePick42, ICQ: 74128155
"It''s all part of the conspiracy of conspirators conspiring to conspire their own conspiracies..."

Share this post


Link to post
Share on other sites
First problem: your line
<#include iostream.h> 

should actually be
#include <iostream.h> 


Actually, it should REALLY be
#include <iostream>
using namespace std;


If you don''t know these, you should spend some time with a C++ book.

The MSDN is available on the web. http://www.msdn.com.



Don''t listen to me. I''ve had too much coffee.

Share this post


Link to post
Share on other sites
Whoops. Yes, I knew that already. I''ve just come back from my rugby match (where I got the VC CD) and had a few beers after the game. Not quite thinking properly.

But I am C++ newbie, afterall.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It appears that the namespace std line in not neccessary. I works either way, and it hasn''t made any mention of it in the C++ book that I skimmed through last night (my only intro to C++).

Also, www.msdn.com is not correct.

Is there anywhere I can download the MSDN?

Share this post


Link to post
Share on other sites
It appears that the namespace std line in not neccessary. I works either way, and it hasn''t made any mention of it in the C++ book that I skimmed through last night (my only intro to C++).

Also, www.msdn.com is not correct.

Is there anywhere I can download the MSDN?

Share this post


Link to post
Share on other sites
http://www.msdn.microsoft.com/

So far I know, you can''t download MSDN, but if you have cable modem isnt necesary. Online version is always more up to date.

Search and you''ll find, ask and you''ll receive.

Share this post


Link to post
Share on other sites
If you have VC++ 6.0, when you installed there should have been an option to also install the MSDN. If maybe you missed that I''m pretty sure you can go to Add/Remove programs and use that to add/remove features from your VC++ installation (including MSDN).

Also, I''m pretty sure there is a lot of documentation that comes from the Platform SDK (also available from MS).



The hackers must have gotten into the system through the hyperlink!!

Invader''s Realm

Share this post


Link to post
Share on other sites
>> If you have VC++ 6.0, when you installed there should have been an option to also install the MSDN.

No, the MSDN library comes on a separate CD which must be installed afterwards. I am not sure it is included with all versions of Visual Studio - if not it can be purchased seperately.

And yes, MSDN library *can* be downloaded from Microsoft''s site, but that requires the MSDN universal subscription (which we fortunately have here where I work)



Jacob Marner, M.Sc.
Console Programmer, Deadline Games

Share this post


Link to post
Share on other sites
quote:
Original post by felonius
No, the MSDN library comes on a separate CD which must be installed afterwards. I am not sure it is included with all versions of Visual Studio - if not it can be purchased seperately.



But the option is still given after teh VC++ install. I never said that it wouldn''t ask you to switch CDs

Since the option is given after the install of VC++ 6.0 I assume that the 2 MSDN CDs come with VC++ 6.0, but for some reason I keep thinking they came with my Visual Basic 6.0. Hmmm....



The hackers must have gotten into the system through the hyperlink!!

Invader''s Realm

Share this post


Link to post
Share on other sites
Mine''s the student version, I think. In any case, I don''t have the MSDN CDs.

How important are they anyway, for a beginner C++ programmer (experienced with Java)?

Is there no way that I can download them online so my help files etc. work?

Share this post


Link to post
Share on other sites