PDA

View Full Version : different versions of c?



richdb
03-02-2006, 09:22 PM
Hi,
So what are the differences between all the different versions of c or c++? I see visual c, turbo c, ansi c, c99, etc. What does it all mean?? If you can name some others that would be good too.

MadCow257
03-02-2006, 09:54 PM
http://en.wikipedia.org/wiki/C99#History

Visual c and turbo c are just compilers/ide

Salem
03-03-2006, 07:29 AM
Visual C++ 6 and TurboC are also museum pieces.

BobMcGee123
03-03-2006, 09:38 AM
I use nothing but Visual C++ 6.

No real reason to change.

I have .net, never use it.

EDIT:
what do you use salem?

Perspective
03-03-2006, 10:23 AM
>>No real reason to change.

how bout this as a reason


for (int i = 0; i < 10; i++) {
//foo
}

for (int i = 0; i < 10; i++) {
//bar
}


VC++ POS-Compiler-Crap: Error, the variable 'i' has already been declared.

Dave_Sinkula
03-03-2006, 10:34 AM
>>No real reason to change.

It may need a few fixes (http://www.dinkumware.com/vc_fixes.html).

Salem
03-03-2006, 10:35 AM
Well during the week I use two different compilers for the embedded platforms being developed, along with Borland builder and gcc under cygwin (and the code also has to compile with Visual studio as well) for host development.

At the weekend, I use gcc on Linux, and some dev-c++ or gcc under cygwin if I'm in a PC mood.

Plus a collection of museum compilers for that old-time feeling ;)

As you can see, I have no time for "works with this compiler" type of programming (void main'ers take note). I need and use code which is standard C, which has a passable chance of compiling the same on all platforms. It also means on a day to day basis that I don't really care about which compiler I'm using.

> If you can name some others that would be good too.
http://www.compilers.net/
http://www.thefreecountry.com/compilers/index.shtml

BobMcGee123
03-03-2006, 10:52 AM
>>how bout this as a reason

Never bothered me, I'm so used to it that getting rid of that 'problem' would probably just aggravate me.

>>It may need a few fixes.

Duly noted, although those all seem to be problems fixable in under ten seconds in the stl libraries (meaning, why go out and buy a new compiler/ide if all the major problems are ).

@salem: so, you're a professional programmer. Makes sense that you need the high tech up-to-date stuff with perfect (or as close to perfect) ANSI C specifications. I have no intention of ever going into the professional software development field, my method has always been 'find something that works, and stick to it stubbornly.'

Ken Fitlike
03-03-2006, 11:53 AM
VC++ POS-Compiler-Crap: Error, the variable 'i' has already been declared.I recognise the second part of that error message but I don't recall ever seeing the first - maybe I need to apply a 'service pack'. :(

I don't think any of the ms compilers handle c99; this from msvc++.net 2003 help:
Because the timing of the release of C99, this version of Visual C++ is not conformant with that standard.I don't think their latest offering(msvc++ 2005) is any better in this regard - I recall reading something about a lack of customer demand for c99 but, unfortunately, can't provide a link/quote for that.

richdb
03-03-2006, 09:40 PM
So what was unique about Turbo C and Visual C? What did they do differently? What did "Visual" imply?

sean
03-03-2006, 10:01 PM
Visual C++ was Microsoft's line of compilers. It's IDE had certain features that made the programming process more visual - like a drag and drop form designer, stuff like that. Turbo C++ was Borland's line of compilers. I liked them - but there wasn't anything terribly unique about them. They weren't perfect with the standard, but they were pretty good.

Dave_Sinkula
03-03-2006, 10:02 PM
I have no intention of ever going into the professional software development field, my method has always been 'find something that works, and stick to it stubbornly.'Then don't throw out that DOS PC. But if you ever intend to write programs for Windows, then you're in for an eye-opener. :p

Turbo C (http://en.wikipedia.org/wiki/Turbo_C) and Visual C++ (http://en.wikipedia.org/wiki/Visual_C%2B%2B) were early IDE (http://en.wikipedia.org/wiki/Integrated_development_environment)s. They packaged the compiler, editor, etc. into a package to make code development easier. These programs have been superceded numerous times by their own later version, but also more recently by better, more standards compliant compilers that are free and can generate code for modern operating systems.

Besides being a marketing term, the "Visual" meant you could do some things such as icon or dialog editing in them too. Easier generation of GUI applications.

IMO/IIRC Turbo C was pretty much obsolete or heading that way by Windows 3.1, and Visual C++ went that way when C++ was standardized in 1998.

laserlight
03-03-2006, 11:16 PM
Duly noted, although those all seem to be problems fixable in under ten seconds in the stl libraries (meaning, why go out and buy a new compiler/ide if all the major problems are ).
I've read that MSVC6 (and MSVC7.0, but not MSVC7.1) doesnt handle templates correctly, so may have problems with code that implements some advanced template techniques like those used in Blitz++ (http://www.oonumerics.org/blitz/).

jwenting
03-04-2006, 12:08 AM
Visual C++ 6 doesn't implement the ISO standard at all correctly (something like 60% I believe?).
Cannot really blame Microsoft for it as the standard was still being finalised when they created it, but enough reason to ditch it for something more recent (like VC2005 and the PSDK, which are about 3 months old instead of 10 years).

Only trouble I've with VC2005 Express on my machine is that it's somewhat unstable and tends to hang when doing things like trying to access the context sensitive help or switching projects, but apart from that it looks and works nicely.

You'll have to get used to using all unicode though for Win32 applications, unless I've missed a setting somewhere that forces 8 bit strings.

richdb
03-04-2006, 12:19 AM
Thanks for the replies folks, good info

jwenting
03-04-2006, 01:03 AM
update: found the culprit. VC2005 sets the compiler to use unicode by default. Turn that to "not set" in the compiler options and it will use regular 8 bit characters (as are used pretty much in every book and piece of code I've ever seen).

BobMcGee123
03-04-2006, 11:12 AM
But if you ever intend to write programs for Windows, then you're in for an eye-opener.


I've actually done quite a lot with pure win32 API and MFC on this compiler, works great...


EDIT:
to be fair, you have piqued my interest, I'm reading around (this one is just why you should upgrade from visual studio 6 to .NET 2003, which is already old, plus I'm downloading Visual C++ 2005 express)

http://msdn.microsoft.com/visualc/productinfo/topten/upgrade60/

Dave_Sinkula
03-04-2006, 12:34 PM
I've actually done quite a lot with pure win32 API and MFC on this compiler, works great...Sarcasm lost. It was more in reference to the possibility of 'sticking to' Turbo C. See, with that you can't write for Win32 because it didn't exist back then.

to be fair, you have piqued my interest, I'm reading around (this one is just why you should upgrade from visual studio 6 to .NET 2003, which is already old, plus I'm downloading Visual C++ 2005 express)When you get the more standards-compliant version(s) installed, see if any of your programs break. V6 will let you learn to do things the wrong way and be happy about it.

BobMcGee123
03-04-2006, 01:23 PM
Sarcasm lost. It was more in reference to the possibility of 'sticking to' Turbo C. See, with that you can't write for Win32 because it didn't exist back then.


I thought we were talking about visual C++ 6




When you get the more standards-compliant version(s) installed, see if any of your programs break. V6 will let you learn to do things the wrong way and be happy about it.

Porting (game code) from visual studio 6.0 to .net 2003 worked fine, I had to perform only very few manual changes, otherwise the process was automatic. Any move to express 2005 has been catastrophic, but I guess I can't really expect more from something that was a free download.

Ultimately, it seems the biggest reason for switching over is 'compliance' with "real" language specifications. As you said, V6 let me do things the 'wrong' way, but it's only the 'wrong' way if I actually ever need to do things the 'right' way (i.e, if I was a professional). Those STL problems you outlined were the things I was most concerned with, and sooner or later the newest versions will be eventually be found to be wrought with problems anyway. Right now I'm just programming a simple computer game.

Dweia
03-05-2006, 04:13 AM
And I see that the game your making will be open source, so what happens when people with their standards compliant compilers want to compile your program themselves?

BobMcGee123
03-05-2006, 11:36 AM
I mean this as nicely as possible, but what does that matter to me? Why should I care if somebody else wants to compile my code? I already said I'm not in a professional development position...the answer is that it doesn't matter if you can't compile it :)

It's open source as in people will be able to see that I actually wrote it...it wont' be like firefox where I'd invite people to try to improve upon it by writing new build versions.

novacain
03-05-2006, 06:12 PM
>>Visual C++ 6 and TurboC are also museum pieces.

Hey! I'm using MSVC v6 at the moment to write online share trading software for one of Australia's largest online share trading company.

Just because we turn-over more than Au$100 million per year is no reason for the company to buy an IDE made this century...

As I only contract for apps targetting MS OS'es, I use MSVC 2003 at home.

jwenting
03-06-2006, 07:10 AM
Museum pieces can still work...
But I'd not recommend any new project to make itself dependent on them.

Of course at some point you're going to face the problem of not being able to find people who've ever used that museum piece and there being no more education available to train people to use it (if you can find anyone willing and capable).

BobMcGee123
03-06-2006, 03:50 PM
You know, there's still something good to be said about people that have experience with older arcane software/hardware etc. It's not like getting up to date is particularly difficult either, especially when most of us posting are already proficient with at least one language.