Questions about VC++ 6.0

I've had the CD for this for a while (along with VB 6.0), but have mainly used VB. I know it's old, but I finally decided to use this old version of VC++ to start to learn VC++ (before I move on to newer versions that offer more features). Some of the code I've seen posted on the net doesn't work on VC++ 6.0, even though the needed include files are present in VC++ 6.0.

The biggest problem I am having is with #include <iostream>. Yes the file IOSTREAM does exist in the INCLUDE folder of my VC++ 6.0 installation, right along side the older file IOSTREAM.H. However when I use "#include <iostream.h>" things work fine (except for some things that are present in iostream that aren't present in iostream.h). But the moment I try to use "#include <iostream>" I'm given an error message that it can't find a file called "streambuf". Apparantly the file "iostream" references a file called "streambuf", and while Microsoft put "iostream" in their installation CD for VC++6.0, it seams that they completely forgot to include at least one file that "iostream" references! I've completely searched my VC++ 6.0 CD and can't find it anywhere! Though it appears that Microsoft had no problem remembering to include on their CD the older version of the "streambuf" file, called "STREAMB.H", and what may be simply an incorrectly named copy of "streambuf", called "STREAMBF", but I'm not sure (though changing the name from "streambf" to "streambuf" , while appearing to correct the first problem, simply introduces other errors, I've found, as there's also other required header files that are also missing).

Is there any other place that I could download missing header files? Is there some online repository/archive website that exists somewhere that somebody put up, for the purpose of hosting commonly missing VC++ header files? I know there's tons of sites that you can download missing DLL files (like if you have a program that doesn't run that requires a DLL file that is missing for some reason), but I can't find any website hosting header files that are required for the correct operation of VC++.

Maybe I just got a bad CD? Does anybody else on this cplusplus forum have a VC++ 6.0 CD that maybe has a copy "streambuf"? Or maybe somebody here know some other site that I could download this missing file from? And it's not the only missing file either. Try using "#include <vector>", and you'll see that the header file VECTOR file can't find the other header files that it needs. And there is no "vector.h" alternative to use either.

And please don't just say what most people say to people who are still using old programming languages. Don't say "You should use something newer than VC++ 6.0". Yes I know it's old, but it's also much simpler to set up this IDE than newer IDEs, that have so many environment vars that ALL must be set EXACTLY right, or everything won't work. So due to this simplicity, and the fact that I want to learn VC++, I've decided to use VC++ 6.0 as my starting point for learning the language. So please don't tell me I need to upgrade my version of VC++. I want solutions to the problems I'm having in VC++6.0, not suggestions to upgrade to a newer version of VC++. If I wanted to upgrade, I'd have simply downloaded Visual Studio 2013 Express. I am using the older version, because I WANT to be using the older version (at least while I'm still learning the basics of VC++ programming).

If anybody here has a solution to my problem, and has had previous experience in the past using this older version of VC++, please reply to this therad with the solution (or solutions) to my problem. However, if you are only familiar with the newer versions of VC++ (or some alternative), and you don't know how to fix my problem, so that your only advice is to upgrade or to use an alternative compiler and IDE (such as CodeBlocks, MinGW, G++, etc), please do not reply. If I wanted to use something else, I would have done that already, as I am already aware of the alternatives and upgrades.
Last edited on
There is no sense in learning the older versions before the newer versions - it will only require difficult unlearning.

You can download Visual Studio 2013 Express Edition for Desktop for free.
Last edited on
So are you saying that you will not help me with the issues I mentioned in this post?

Also, just as VB6 is a good hobbyist programming language, so is VC++6. There's still a large community that uses VB6, and I'm guessing that there is also for VC++6, and I'm hoping that such a hobbyist on these forums will give me some help here.
OP wrote:
it's also much simpler to set up this IDE than newer IDEs,


I can't help but chuckle at the irony of this statement after you just made a page-long post about the problems you're having setting this IDE up.

No IDE worth using should take much effort to set up. Typically you just run an installer and it's good to go. Modern versions of VS are no exception. I don't know what makes you think you have to mess with environment vars to get them working, but you don't.


EDIT:

Also, if you want to learn C++, you should pick a compiler that actually conforms to the C++ standard. VS6 does not (it came out like 5 years before the language was standarized) -- so you won't actually be learning C++ if you use it... you'll be learning a language that is similar to but not quite the same as C++.

This means that some of the things you'll be learning and doing will be wrong and will not work if you try to do them on a modern C++ compiler.


So in every way, this is a bad idea. Reconsider your choice of VS6
Last edited on
I'll check it out in a bit Ben and get back with you. Could you possibly post a small code snippet of what isn't working on your VC 6? Just a Hello, World or something?

I don't use VC 6 that much, but I do use it. I'll take the contrary view here and agree with you. I don't see anything wrong with using VC 6 or older tools if they work. I had just used mine the other day to run some of Charles Petzold's old Windows programs. He was/is the famous old teacher of Windows Programming from VC 6 times (and before).
I just tried it Ben with my VC 6 installation and don't appear to be having the difficulties you are having. When I just use #include <iostream> it works fine; at least my Hello, World! examples. Its possible though that my VC 6 may have been patched by updates though that are no longer forthcomming. But I'm not really sure of that though either because I've had a lot of computers between the late 90s which was the heyday of VC 6 and now, and I doubt if any of my recent installs were patched by MS, as I don't believe they've been patching VC 6 for years.

Anyway, here are some of my test programs with VC 6 on my good old trusty XP laptop. All the programs were compiled with VC 6 except for one with PowerBASIC 6.03 and the other with mingw C++ from Code::Blocks 10.05...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
#include <iostream>                // VC 6 Compiles 64k Release Build
using namespace std;               // 96 characters

int main(void)
{
 cout << "Hello, World!" << endl;
 return 0;
}
*/

/*
#include <iostream>                // VC 6 Compiles 64k Release Build
#include <string>                  // 138 characters
using namespace std;

int main(void)
{
 string strHello="Hello, World!";
 cout << strHello << endl;
 return 0;
}
*/

/*
#Compile Exe                       ' PowerBASIC Console Compiler Compiles 10k
#Dim All                           ' 86 characters

Function PBMain() As Long
  Print "Hello, World!"
  PBMain=0
End Function      
*/

/*
#include <cstdio>                  // Compiles 40k Release Build
                                   // 68 characters
int main(void)
{
 printf("Hello, World!\n");
 return 0;
}
*/

/*
#include <iostream>               // Mingw CodeBlocks 10.05 457k

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}
*/

#include <cstdio>                  // Code::Blocks Compiles 6k 
                                   // 68 characters
int main(void)
{
 printf("Hello, World!\n");
 return 0;
}


The smallest one in executable size is the mingw (an older version) using cstdio for console output instead of iostream. That would be 6k. Next up in size is the PowerBASIC Console Compiler version at about 10k. That program isn't directly comparable to the C++ programs though because it has a 'String Class' built right into it which is far superior to anything in C++, as well as built in support for COM and a lot of other things.

Any of the C++ programs using iostream will be quite bloated in size; no getting around that. I might point out that VC6 programs are pretty bloated themselves. You have to get into some rather arcane compiler and linker switches to get the size down. That 40k VC 6 program using cstdio can be brought down to 3.5 k using various switches and other really wierd stuff.

Last edited on
Just had a thought Ben. I recall when I got Win 7 I figured old Visual Studio 6 likely wouldn't work on it. But I searched the web and found some installation instructions for getting it to work. I'm wondering if your installation is bad, because as my code above shows, its working for me, at least in terms of those little Hello, World examples with VC 6.

Actually, I have both VB6 and VC6 working fine. I'm still semi-supporting an old but major VB6 app I wrote many years ago. I redid that app in both C++ and PowerBASIC, but some folks still prefer the old VB6 app.

If I recall the major thing about the installation instructions for Win 7 and VS 6 involved an ancient version of Java that you had to fool the installer not to install. But I don't see how that would affect C++.
VB6 isn't really used anymore IIRC. Your best option is to just move away from it and learn Visual Basic .Net
Topic archived. No new replies allowed.