Valhalla Legends Forums Archive | C/C++ Programming | ANSI Standard Library

AuthorMessageTime
Spilled[DW]
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.
May 28, 2005, 7:01 AM
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?
May 28, 2005, 7:55 AM
Spilled[DW]
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
May 28, 2005, 8:01 AM
Mephisto
[quote author=Spilled[DW] link=topic=11713.msg113967#msg113967 date=1117267262]
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
[/quote]

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).
May 28, 2005, 4:23 PM
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.
May 29, 2005, 2:04 AM
Quarantine
You've got to be kidding me..
May 29, 2005, 3:18 AM
Spilled[DW]
[quote author=Warrior link=topic=11713.msg114011#msg114011 date=1117336701]
You've got to be kidding me..
[/quote]

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
May 29, 2005, 5:28 AM
Newby
[quote author=Spilled[DW] link=topic=11713.msg114024#msg114024 date=1117344491]
[quote author=Warrior link=topic=11713.msg114011#msg114011 date=1117336701]
You've got to be kidding me..
[/quote]

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.
[/quote]

He's talking about Mangix.
May 29, 2005, 2:00 PM
ColT
[quote author=Mangix link=topic=11713.msg113998#msg113998 date=1117332258]
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.
[/quote]

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.
May 29, 2005, 2:14 PM
Quarantine
Yeh not you, good luck learning.
May 29, 2005, 2:33 PM
Kp
[quote author=ColT link=topic=11713.msg114049#msg114049 date=1117376054][quote author=Mangix link=topic=11713.msg113998#msg113998 date=1117332258]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.[/quote]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.[/quote]
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).
May 29, 2005, 5:11 PM
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.
May 29, 2005, 6:24 PM
ColT
Didn't Microsoft buy Bjarne Stroustrup C++, and just make it better?
May 29, 2005, 6:33 PM
Quarantine
They rewrote the runtime library (as must be done for every implementation across platform) to suit the windows API
May 29, 2005, 7:07 PM
Spilled[DW]
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.
May 29, 2005, 7:34 PM
Mephisto
[quote author=ColT link=topic=11713.msg114073#msg114073 date=1117391637]
Didn't Microsoft buy Bjarne Stroustrup C++, and just make it better?
[/quote]

No.  Bjarne Stroustrup wrote the original C++ standard while working at AT&T IIRC.  It's thus been implemented to this day in a variety of different ways, but still following the guidelines of the ANSI-C++ standard which is the C++ standard!  Microsoft wrote their implementation of C++ following the ANSI-C++ standards but they also added non-ANSI-C++ standard implementations which are toggable options in the compiler settings.

Spilled[DW], the book recommends MSVC++ 6.0 IIRC.
May 29, 2005, 7:52 PM
Kp
Spilled: most of us don't have that book, so reminding us of the version isn't particularly helpful.  Just drop the code in your compiler and try it out.  If it fails, post:
[list][li]the compiler you're using (and its version)[/li]
[li]the compiler's error message(s)[/li]
[li]the failed source code[/li][/list]

At present, you've given us nothing with which to work, so we cannot provide any meaningful help to resolve the problem.
May 29, 2005, 8:26 PM
Mangix
[quote author=Mephisto link=topic=11713.msg114091#msg114091 date=1117396364]
[quote author=ColT link=topic=11713.msg114073#msg114073 date=1117391637]
Didn't Microsoft buy Bjarne Stroustrup C++, and just make it better?
[/quote]

No. Bjarne Stroustrup wrote the original C++ standard while working at AT&T IIRC. It's thus been implemented to this day in a variety of different ways, but still following the guidelines of the ANSI-C++ standard which is the C++ standard! Microsoft wrote their implementation of C++ following the ANSI-C++ standards but they also added non-ANSI-C++ standard implementations which are toggable options in the compiler settings.

Spilled[DW], the book recommends MSVC++ 6.0 IIRC.
[/quote]
according to Webopedia, Bjourne Stoutstrup made C++ at Bell Labs. and the original C written by Dennis Ritchie was made there as well.

@spilled:i use #include <iostream> as well with cout and cin and all the other functions that do who knows what.

and for a  good list of compilers, follow this link. http://www.cplusplus.com/info/compilers/

i personally use Bloodshed Dev-C++ but you can use w/e you want.
May 29, 2005, 9:47 PM
K
[quote author=Mangix link=topic=11713.msg114108#msg114108 date=1117403260]
i personally use Bloodshed Dev-C++ but you can use w/e you want.
[/quote]

While we're picking at things, Dev-C++ is an IDE; you mean you use the mingw c++ compiler. ;)

Or for those of you in SAT mode,
Bloodshed Dev-C++ : Visual C++ :: mingw C++ compiler : Microsoft C++ compiler.
May 29, 2005, 10:22 PM
R.a.B.B.i.T
They got rid of analogies on the new SAT :\
May 29, 2005, 10:44 PM
Mangix
[quote author=K link=topic=11713.msg114111#msg114111 date=1117405329]
[quote author=Mangix link=topic=11713.msg114108#msg114108 date=1117403260]
i personally use Bloodshed Dev-C++ but you can use w/e you want.
[/quote]
While we're picking at things, Dev-C++ is an IDE
[/quote]
... Dev-C++ is a compiler. it can compile stuff. you must have used a really old version or have no idea what you are talking about.

btw:what do you mean SAT?
May 30, 2005, 2:36 AM
Kp
[quote author=Mangix link=topic=11713.msg114141#msg114141 date=1117420617][quote author=K link=topic=11713.msg114111#msg114111 date=1117405329]While we're picking at things, Dev-C++ is an IDE[/quote]... Dev-C++ is a compiler. it can compile stuff. you must have used a really old version or have no idea what you are talking about.[/quote]

Actually, according to the Dev-C++ website:

[quote]Bloodshed Dev-C++ is a full-featured Integrated Development Environment (IDE) for the C/C++ programming language. It [u]uses Mingw port of GCC (GNU Compiler Collection) as it's compiler[/u].[/quote](emphasis,links mine)  Perhaps when you say people are misinformed, you should cite your sources.  Web sources are preferred, since we can confirm that the cited pages exist and say what you claim.
May 30, 2005, 2:48 AM
Mephisto
[quote author=Mangix link=topic=11713.msg114141#msg114141 date=1117420617]
[quote author=K link=topic=11713.msg114111#msg114111 date=1117405329]
[quote author=Mangix link=topic=11713.msg114108#msg114108 date=1117403260]
i personally use Bloodshed Dev-C++ but you can use w/e you want.
[/quote]
While we're picking at things, Dev-C++ is an IDE
[/quote]
... Dev-C++ is a compiler. it can compile stuff. you must have used a really old version or have no idea what you are talking about.

btw:what do you mean SAT?
[/quote]

You clearly don't know the different between an IDE and a compiler.  An IDE is the development environment (the GUI so-to-speak) and the compiler is the program integrated into that GUI which does all the work when you hit that button that says compile.  ;)
May 30, 2005, 3:06 AM
Mangix
yes. and there is a compile button on it. do i have to send a screenshot?
May 30, 2005, 6:45 AM
Mephisto
[quote author=Mangix link=topic=11713.msg114155#msg114155 date=1117435550]
yes. and there is a compile button on it. do i have to send a screenshot?
[/quote]

Why are you so rude/bad mannered?
May 30, 2005, 8:47 AM
Null
MANGIX SERIOUSLY, YOU ARE A FUCKING MORON x 100000000000000000000000000000000000000000000

MODS PLEASE LEAVE MY POST PLEASE  :'(

Mod edit: While I contemplated removing this, I have to agree. Mangix, you're an absolute moron.
May 30, 2005, 2:08 PM
Mangix
...

im just saying Dev-C++ can compile.
May 30, 2005, 6:20 PM
Quarantine
[quote author=effect link=topic=11713.msg114166#msg114166 date=1117462138]
Mod edit: While I contemplated removing this, I have to agree. Mangix, you're an absolute moron.

« Last Edit: Today at 11:14:47 by Zakath »
[/quote]

...LOL. Wow.
Yes, reread Mephisto's posts maybe you might be enlightened as to what an IDE/Compiler is :]
May 30, 2005, 7:25 PM
Kp
[quote author=Mangix link=topic=11713.msg114196#msg114196 date=1117477213]im just saying Dev-C++ can compile.[/quote]

As we've already explained several times, Dev-C++ cannot compile.  It can call CreateProcess() to run the MinGW port of the GNU C Compiler.
May 30, 2005, 7:27 PM
K
[quote author=Mangix link=topic=11713.msg114141#msg114141 date=1117420617]
... Dev-C++ is a compiler. it can compile stuff. you must have used a really old version or have no idea what you are talking about.

btw:what do you mean SAT?
[/quote]

1. Check in the "settings" section of your Dev C++ IDE. See how it has an option to use either the borland c++ compiler, or the mingw c++ compiler?  These compilers are seperate programs which your IDE runs with a specified command line.  Then it checks the output of these programs and parses it to display success or error messages.

2. You'll get there in 4 or 5 years.
May 30, 2005, 8:35 PM
Myndfyr
[quote author=Kp link=topic=11713.msg114204#msg114204 date=1117481243]
[quote author=Mangix link=topic=11713.msg114196#msg114196 date=1117477213]im just saying Dev-C++ can compile.[/quote]

As we've already explained several times, Dev-C++ cannot compile.  It can call CreateProcess() to run the MinGW port of the GNU C Compiler.
[/quote]

There's a reason Mangix was permanently banned from StealthBot.net.  And I'd just like to point out, they are a LOT more lax over at SB.net.  ;)
May 30, 2005, 9:27 PM
Mangix
i checked the settings and it only shows Default Compiler. it doesnt let me chose anything else :(.

ok this is getting annoying. how about someone just splits this topic and send the bs to the trash can so that the maker of this thread can get help?

[quote]1. Check in the "settings" section of your Dev C++ IDE. See how it has an option to use either the borland c++ compiler, or the mingw c++ compiler? These compilers are seperate programs which your IDE runs with a specified command line. Then it checks the output of these programs and parses it to display success or error messages.

2. You'll get there in 4 or 5 years.
[/quote]
May 30, 2005, 10:38 PM
ColT
Warriors' "quote signature" is quite funny. :D
May 30, 2005, 11:30 PM

Search