• Welcome to Valhalla Legends Archive.
 

ANSI Standard Library

Started by Spilled, May 28, 2005, 02:01 AM

Previous topic - Next topic

Spilled

well i just started reading this C++ book to learn the language and i ran into a problem its saying my ANSI isn't up-to-date. With this whole situation i am lost and really dont know what im doing. How would i check which i have? and if its not the up-to-date version how would i go about updating? ANY help is appreciated and please no flaming. Thanks in advance all.

Mangix

ANSI isnt up to date? ANSI is a type of encoding on Notepad unless you talking about the ANSI-C++ standard. should be a problem with your compiler. what do you use?

Spilled

Microsoft Visual C++

What is does in the book im reading is show a code for hello world program.
Beside it, it says if you have and older compiler this code will not work and you will have to do it like this and shows another source. It says this is because the new ANSI Standard Libraries is not found.

Edit: My book is Sams Teach Yourself C++ In 21 Days 4th Edition

Mephisto

Quote from: Spilled[DW] on May 28, 2005, 03:01 AM
Microsoft Visual C++

What is does in the book im reading is show a code for hello world program.
Beside it, it says if you have and older compiler this code will not work and you will have to do it like this and shows another source. It says this is because the new ANSI Standard Libraries is not found.

Edit: My book is Sams Teach Yourself C++ In 21 Days 4th Edition

Have you even tried to compile the program?  Do you know how to properly compile the program?

Chances are if you're using MSVC then your compiler is up-to-date, regardless of the version (unless you're using something lower than version 6.0).

Mangix

Visual C++ and C++ are diffrent. VC++ needs runtimes while C++ doesnt.

also for a hello world in VC++, it would be something like printf("Hello World"). im not familiar with the header files in VC++ but that should work.

Warrior

You've got to be kidding me..
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

Spilled

#6
Quote from: Warrior on May 28, 2005, 10:18 PM
You've got to be kidding me..

What do you mean "You've got to be kidding me.." i asked a simple question. I'm sorry if it offended you in anyway im just trying to learn. And the books says try to compile this source and if it errors then to try this source and if that source works my compiler is "An Antiquated Compiler".

Any help is appreciated. (Suggest me a compiler that would work with this book maybe?) Thanks all

Edit: i dont use Printf(text) i use #include <iostream> with cout & cin

Newby

Quote from: Spilled[DW] on May 29, 2005, 12:28 AM
Quote from: Warrior on May 28, 2005, 10:18 PM
You've got to be kidding me..

What do you mean "You've got to be kidding me.." i asked a simple question. I'm sorry if it offended you in anyway im just trying to learn.

He's talking about Mangix.
- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

ColT

Quote from: Mangix on May 28, 2005, 09:04 PM
Visual C++ and C++ are diffrent. VC++ needs runtimes while C++ doesnt.

also for a hello world in VC++, it would be something like printf("Hello World"). im not familiar with the header files in VC++ but that should work.

I couldn't stop laughing.... printf("Hello World") would be not using #include <iostream>, I use #include <iostream>, because it's made for input and output. C++ & VC++ are the same. Just different companys made them and added there little *special* touch. Ex:\\ Borland, Microsoft.

Warrior

Yeh not you, good luck learning.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

Kp

Quote from: ColT on May 29, 2005, 09:14 AM
Quote from: Mangix on May 28, 2005, 09:04 PMVisual C++ and C++ are diffrent. VC++ needs runtimes while C++ doesnt.

also for a hello world in VC++, it would be something like printf("Hello World"). im not familiar with the header files in VC++ but that should work.
I couldn't stop laughing.... printf("Hello World") would be not using #include <iostream>, I use #include <iostream>, because it's made for input and output. C++ & VC++ are the same. Just different companys made them and added there little *special* touch. Ex:\\ Borland, Microsoft.
Stroustrup is NOT a company, and he never has been.  He's a man who had some good ideas while working for AT&T.  Incidentally, stdio is also made for input/output (hence the name), and tends to work much better for serious code.  It also is available with just libc (which you'll be using anyway if you use any syscall wrappers).  Also, you completely forgot to mention that C++ is a standard, which has been implemented by various compilers including GCC, Microsoft Visual C++, and Borland (and I've probably forgotten a few minor ones, but GCC is the only one you really need to remember anyway).
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Mephisto

Regardless of Kp's obvious biased opinion, he's right.  Don't listen to the above idiots who say C++ is something other than a standard which is by no means "something" that can be useful unless implemented in the form of a compile so-to-speak.  And there are many different compilers out there inclduing the ones Kp mentioned.

Just a note, if someone says C++ is different from Visual C++ they're probably referring to Microsoft's specific add-ons to the C++ standard in their compiler settings.

ColT

Didn't Microsoft buy Bjarne Stroustrup C++, and just make it better?

Warrior

They rewrote the runtime library (as must be done for every implementation across platform) to suit the windows API
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

Spilled

Hrmm, interesting but do you think someone could tell me what compiler i should use to fit the coding in this book? (Sams teach yourself c++ in 21 days fourth edition) Thanks in advance all very much appreciated.