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++.
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.
// 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.
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.
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
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.
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
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.
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.
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.
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.
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.
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
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.
I'm sorry? Was that directed at me? (No, the link doesn't work)
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
// 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?
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.
Yes. In C++ a "return 0;" is implied if no explicit return statement is present.
it is but he should first focus on learning what algorithms are how to describe them iteration vs recursion etc
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)
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.
Obviously (Computer engineer specialised in programming and application development)
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.
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.
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.