The online racing simulator
Microsoft Visual C++ Version 6
(75 posts, started )
#1 - sam93
Microsoft Visual C++ Version 6
A DVD I purchased what teaches you the basics of C++ says I will be Visual C++ Version 6, does anyone know where I can find it because I have done a search on google to see if I can download it but no hope.
I used this when i did programming on weekend classes im not sure but i think dev c++ is basically the same which mite be a last resort if u cant find visual C++.
Visual Studio 6 was released in 1998, I doubt you can find it anywhere (legally) anymore.
#4 - sam93
it's only because that version used <iostream.h> and the new one uses <iostream> but I have just read a page what tells me what I need to modify to get it to compile.
I have also read a page that says version 6 is still used by a few people, a bit strange as the newer versions have came out.

Well I will use it and see if I can get in to work.
-
(MonkOnHotTinRoof) DELETED by MonkOnHotTinRoof
-
(Mazz4200) DELETED by Mazz4200
#5 - sam93
Quote from MonkOnHotTinRoof :I don't think this version is for free (and I doubt they are still selling it anyway).
You could download some other compiler. If you need basics of C++, it shouldn't matter which compiler you use anyway.

some options:

http://www.microsoft.com/express/vc/
(successor of VC 6.0, with some things stripped out being "free")

http://www.digitalmars.com/download/freecompiler.htm
(good for learning, as you don't get IDE clutter with it )

http://www.bloodshed.net/devcpp.html
(haven't used that one in a while)

http://gcc.gnu.org/install/binaries.html
(the ultimate free one

Dunno in what stage the open watcom is, so I won't recommend it, it was never for newbies anyway

Thanks very much, it teaches me using the old headers and that so I will try to next one up from 6 and see how it goes.
#6 - sam93
// This is a comment
// This program will accept numbers and display their sum

#include <iostream.h>

void main()
{
// define variables
float num1;
float num2;

// Enter data for the variables
cout << "Enter a value for the first variable: ";
cin >> num1;
cout << "Enter a value for the second variable ";
cin >> num2;

// Add the two numvers together
total = num1 + num2;

// Display the result
cout << "The sum of the numbers = " << total;
}

This is what it has asked me to put in and compile but it wont compile, why is this?

Could anyone help...

I know this should be in the programmers part but I thought it would be best to include it into my thread.
Quote from sam93 :I have also read a page that says version 6 is still used by a few people, a bit strange as the newer versions have came out.

I use the Visual Studio 6 IDE myself, just with a newer compiler (VC 2003 I think). The 6 IDE does everything I need and it is very fast compared to the newer ones I have tried.
-
(MonkOnHotTinRoof) DELETED by MonkOnHotTinRoof
#8 - sam93
Quote from MonkOnHotTinRoof :where did u declare total variable?
check compiler errors

I don't know that was just an example it tells you to do, then it goes into depth about how everything works etc...
If I can't get the example to work i'm not going to be able to do the rest am i
#9 - sam93
Quote from MonkOnHotTinRoof :
In file included from /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward/iostream.h:31,
from /tmp/src.cpp:5:
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
/tmp/src.cpp:7: error: '::main' must return 'int'
/tmp/src.cpp: In function 'int main()':
/tmp/src.cpp:20: error: 'total' was not declared in this scope

I dont have a clue what any of that means really, I have only just started programming, dont have a clue about it thats why I have put a DVD what teaches me
I have changed <iostream.h> to <iostream> thats about it but still doesnt work.
-
(MonkOnHotTinRoof) DELETED by MonkOnHotTinRoof
still not working.
If I go into Visual C++ 2008 and create a new .cpp file and put the code in with everything you said it dont allow me to press the debug button
-
(MonkOnHotTinRoof) DELETED by MonkOnHotTinRoof
Quote from MonkOnHotTinRoof :Probably because you didn't add that file to project.
That is why I suggested command line compiler.

BTW: How much experience you have with programming in general ?
Cause if you don't have any, C++ could be a bit of a problem...
Unless you are ready to spend some years on learning it...

Just re learning HTML again.
I dont want to learn everything about it just want to be able to create simple apps and set myself a task of creating an insim app.

Would it be best to buy a beginners book aswell.
Sorry for double post.
After I have got better with C++, I am going to try C# but in about 4 years I will be in uni hopefully to become a software and web developer so i'll learn a lot more then, this is just so I can make little apps like I said previously.
#13 - wien
IMHO if the DVD references <iostream.h> and void main(), throw it away and never look back. It's guaranteed to be old as dirt and it will most likely teach you to write C++ code in ways that no-one really should anymore. So much has happened to C++ and its standard library since then.

Personally I'd recommend getting a good book like for example Accelerated C++. That will teach you more "modern" C++ which may save you a lot of trouble later.

EDIT: Oh, and if you plan on doing this as a career eventually, do yourself a favour and get used to learning this stuff on your own. University will never give you anything beyond the basics (Mine certainly didn't). A few of my class mates graduated lacking even the most basic of programming skills, so don't rely on university teaching you everything you'll need.
Quote from wien :IMHO if the DVD references <iostream.h> and void main(), throw it away and never look back. It's guaranteed to be old as dirt and it will most likely teach you to write C++ code in ways that no-one really should anymore. So much has happened to C++ and its standard library since then.

Personally I'd recommend getting a good book like for example Accelerated C++. That will teach you more "modern" C++ which may save you a lot of trouble later.

The DVD is one of those VTC ones. I will try that book when I have the money, what book is good to get after finishing this one?

Not very happy if that DVD is old, cost me £70 I will be contacting the company and asking for my money back or a more up to date disc for my loss
#15 - wien
Ouch. That's a hefty price tag for something that outdated and even plain wrong (void main() has never been legal C++. main() returns an int.)

As for more advanced books, there's always Effective C++ and friends (anything my Scott Meyers really). They'll teach you a lot of neat tricks on how to write correct and efficient C++ code. You need to have the basics down before moving on to those though.

Other good books include C++ Coding Standards by Sutter and Alexandrescu and The C++ Programming Language, Third Edition by Bjarne Stroustrup (the creator of C++). These also require a some previous knowledge though.
Quote from wien :Ouch. That's a hefty price tag for something that outdated and even plain wrong (void main() has never been legal C++. main() returns an int.)

As for more advanced books, there's always Effective C++ and friends (anything my Scott Meyers really). They'll teach you a lot of neat tricks on how to write correct and efficient C++ code. You need to have the basics down before moving on to those though.

Other good books include C++ Coding Standards by Sutter and Alexandrescu and The C++ Programming Language, Third Edition by Bjarne Stroustrup (the creator of C++). These also require a some previous knowledge though.

Thanks for the help/advice. I will get onto Apex Web Media who distribute these tomorrow and ask what they are going to do about it.
Could you tell me what I can say so I can understand it aswell please so I know what I mean when I say it is well out of date and I want either a refund or something what is update and useful to me.
#17 - wien
Well if the examples on the DVD indeed include <iostream.h> and void main(), I'd just argue that it teaches you non-standard C++, and as such is useless as a learning aid. The code they provide won't even compile in any recent compiler (which you've discovered with Visual Studio Express 2008).

EDIT: To elaborate a bit. The language the DVD is teaching you is most likely a version of C++ from way back before it and its standard library were even standardised (in 1998). What it's teaching you just isn't C++ any more.
Quote from wien :The code they provide won't even compile in any recent compiler (which you've discovered with Visual Studio Express 2008).

no compiler will ever compile code that uses undeclared variables... well no c compiler will

since you apparently dont know anything about coding may i suggest starting by actually learning to code first?
my advice is you should fist start by answering these questions (it doesnt matter that you have no real idea what they mean) http://www.cs.mdx.ac.uk/resear ... ea/saeed/test(week-0).doc hope the link works the server seems to be down for me
#19 - wien
Quote from Shotglass :no compiler will ever compile code that uses undeclared variables... well no c compiler will

Obviously, but that's just one of a host of errors in that code snippet which I assume came from the DVD. He wouldn't have thought up iostream.h and void main() on his own. Those two are dead giveaways that the DVD is old and useless. I've seen enough old learning material to know that much.
Quote from Shotglass :since you apparently dont know anything about coding may i suggest starting by actually learning to code first?

I'm sorry? Was that directed at me? (No, the link doesn't work)
Quote from wien :Obviously, but that's just one of a host of errors in that code snippet which I assume came from the DVD.

yeah but from what i can see its the only error that really makes the code uncompileable instead of just not conform to standards

Quote :I'm sorry? Was that directed at me? (No, the link doesn't work)

nah it was obviously directed at him
#21 - wien
Quote from Shotglass :yeah but from what i can see its the only error that really makes the code uncompileable instead of just not conform to standards

Not conforming to standards means it won't compile on anything newer than Visual C++ 6. The istream.h header has been removed (it's now just iostream), and cin/cout are inside the std namespace. "void main()" won't compile either.

This is the same example in proper C++:

// This is a comment
// This program will accept numbers and display their sum

#include [COLOR=Red]<iostream>[/COLOR]
[COLOR=Red]using namespace std;[/COLOR]

[COLOR=Red]int[/COLOR] main()
{
// define variables
float num1;
float num2;

// Enter data for the variables
cout << "Enter a value for the first variable: ";
cin >> num1;
cout << "Enter a value for the second variable ";
cin >> num2;

// Add the two numvers together
[COLOR=Red]float [/COLOR]total = num1 + num2;

// Display the result
cout << "The sum of the numbers = " << total;
}

yeah but if were honest that just adds a lot of pointless fluff which hasnt got anything to do with programming... which is why any modern language is really the wrong place to learn coding

also strictly speaking is it legal to have a main function that doesnt actually ever return anything?
#23 - wien
Quote from Shotglass :yeah but if were honest that just adds a lot of pointless fluff which hasnt got anything to do with programming... which is why any modern language is really the wrong place to learn coding

Absolute nonsense. That "fluff" is the C++ language. It's rather important if you want to learn C++.

Furthermore, I can't stand the notion that programming must be taught bottom up. Starting people off on assembly or whatever does nothing but ruin their motivation because everything is totally removed from what they'd normally do as a programmer (unless they're going to program micro-controllers or device drivers, but that's another thing entirely). Teach the abstractions first, then delve into the details when the abstraction is well understood.
Quote from Shotglass :also strictly speaking is it legal to have a main function that doesnt actually ever return anything?

Yes. In C++ a "return 0;" is implied if no explicit return statement is present.
Quote from wien :Absolute nonsense. That "fluff" is the C++ language. It's rather important if you want to learn C++.

it is but he should first focus on learning what algorithms are how to describe them iteration vs recursion etc

Quote :Furthermore, I can't stand the notion that programming must be taught bottom up. Starting people off on assembly or whatever does nothing but ruin their motivation because everything is totally removed from what they'd normally do as a programmer (unless they're going to program micro-controllers or device drivers, but that's another thing entirely). Teach the abstractions first, then delve into the details when the abstraction is well understood.

well for one youre talking to an electric engineer here so naturally well clash on this one and i dont believe youll ever really learn to program unless you have some idea of what the machine does
i presume youve read "the story of mel" at some point... if you havent you should

but on abstraction we do agree and thats why i called the using namespace and all that pointless fluff... it has nothing to do with what the program does and is far from abstract
personally ive recently discovered how much i like scheme and i consider it a great language to teach coding with... its almost completely free of fluff and anyone with the ability to learn programing (which that doc i linked to earlier is supposed to assess) will require less than 10 seconds to understand the syntax completely (very much unlike c++ which has lots of required syntax bits that wont make sense until you use it to code something big)
#25 - wien
Quote from Shotglass :it is but he should first focus on learning what algorithms are how to describe them iteration vs recursion etc

Oh absolutely. But not before starting to program. You need to have some basic understanding of programming before those concept will make sense. I'd much rather see this being taught alongside implementing them in some language than as pure theory.
Quote from Shotglass :well for one youre talking to an electric engineer here so naturally well clash on this one

Obviously (Computer engineer specialised in programming and application development)
Quote from Shotglass :and i dont believe youll ever really learn to program unless you have some idea of what the machine does
i presume youve read "the story of mel" at some point... if you havent you should

I haven't but I will. And I agree that at least a basic knowledge of how all the abstraction layers of a computer works is required for most (professional) programmers, I just object to them being taught first.

I remember many of my class mates got completely fed up with programming after a couple of years of assembly and twiddling pointers in C++. They felt this wasn't relevant because they still had no idea how to make a normal, run-of-the-mill Windows application. I'm certain that if it were taught the other way around it would have been easier for them to see the relevance.
Quote from Shotglass :but on abstraction we do agree and thats why i called the using namespace and all that pointless fluff... it has nothing to do with what the program does and is far from abstract

True, in a way. Namespaces are more for convenience when dealing with huge code bases combined with lots of libraries etc. In those cases though I feel they're indispensable. They have nothing to do with making a computer do stuff specifically, but they sure help you concentrate on exactly that when you have megabytes upon megabytes of code you need to stay on top of.
Quote from Shotglass :personally ive recently discovered how much i like scheme and i consider it a great language to teach coding with... its almost completely free of fluff and anyone with the ability to learn programing (which that doc i linked to earlier is supposed to assess) will require less than 10 seconds to understand the syntax completely (very much unlike c++ which has lots of required syntax bits that wont make sense until you use it to code something big)

Never actually tried scheme myself, so I can't comment there, but I agree to a certain extent about C++. It's a huge unruly mofo of a language. Even after using it for 6 or 7 years I still don't feel like I know jack shit. And if you think the current version is bad, just wait until C++0X is released.

You don't need a complete knowledge of C++ to be relatively productive though, and that's kind of what I like about it. It is extremely powerful if you know what you're doing, but it can also be relatively friendly to beginners if you teach it the right way (don't show them pointers and manual memory allocation before they know the standard library by heart)...which is my main objection with all these older C++ books and DVDs.

Microsoft Visual C++ Version 6
(75 posts, started )
FGED GREDG RDFGDR GSFDG