G++ vs. VC++  | | |
March 2nd, 2002, 05:07 PM
|
#1 (permalink)
| | Member
Join Date: Mar 2002 Location: BYU - Provo
Posts: 43
| G++ vs. VC++
I'm taking a C++ class in college right now and they are having us program in Linux. I have come to enjoy Linux and the g++ compiler. I just have a quick question: when I'm in Linux, I can open and use the standard libraries as such: #inlcude <iostream>
whereas, in my VC++ I have to do this and "use" that which I need: using std::flush;
using std::endl;
etc. What's the difference? Is is just the compiler, or is there more to it? I was just wondering... thanks!
__________________
-Fractile81
|
| |
March 2nd, 2002, 05:24 PM
|
#2 (permalink)
| | Member
Join Date: Oct 2001 Location: United States
Posts: 408
|
I didn't know one had to "use" a function. I never did that when I used VC++, but perhaps I should have
g++ stands for "gnu c++" and gcc stands for "gnu c compiler". |
| |
March 2nd, 2002, 06:21 PM
|
#3 (permalink)
| | Not Really a Member
Join Date: Oct 2001
Posts: 25,386
|
you can't do a
#include <iostream.h> ? thought you could...
there are a few differences between the versions, with smaller programs its not as obvious, but when you start making api calls it makes a much larger difference.
dont see why you'd have to declare the namespace for endl though, seeing as somebody would be freakin' retarded to make a function called endl lol
__________________
Helicopters don't fly; they vibrate so much and make so much noise that the earth rejects them.
|
| |
March 3rd, 2002, 01:27 AM
|
#4 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: SoCal.
Posts: 2,853
|
hey...who you calling retarded? 
__________________
FalcomPSX
|
| |
March 3rd, 2002, 01:40 AM
|
#5 (permalink)
| | Not Really a Member
Join Date: Oct 2001
Posts: 25,386
|
DOH falcom you didn't?? lol
Or did you do it to change the functionality of endl?? Guess I could understand that one...  |
| |
March 3rd, 2002, 01:44 AM
|
#6 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: SoCal.
Posts: 2,853
|
i wasn't serious, i never made a endl funciton. |
| |
March 3rd, 2002, 01:52 AM
|
#7 (permalink)
| | Not Really a Member
Join Date: Oct 2001
Posts: 25,386
|
Oh ok  |
| |
March 3rd, 2002, 02:04 AM
|
#8 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: SoCal.
Posts: 2,853
|
hey vass, how familiar are you with c++? |
| |
March 3rd, 2002, 02:07 AM
|
#9 (permalink)
| | Not Really a Member
Join Date: Oct 2001
Posts: 25,386
|
not as familiar as I'd like 
Reminds me I'm supposed to start a small project with C++ for work, creating a small app for a blackberry...
I'm more familiar with VB/VBS and SQL... |
| |
March 3rd, 2002, 02:47 AM
|
#10 (permalink)
| | Senior Member
Join Date: Oct 2001 Location: Eastern Shore
Posts: 701
|
I personally learned how to program first on vc++, and that is waht I have on my hoem comp. I personally like it, color codes things, underlines your errors and makes it alot easier alot of the time.
I currently am using the unix vi editor at school, took awhile to get used to, but I like that too, isnt as fancy vc++, but it gets you used to what you will see in the job place.
As for the use object word, no you do not need it in vc++. On some "cheap" compilers you need to declare those at the top so you can use just plain old cout, cin, endl, etc (from the iostream file), however, if you did not have them declared, then everytime you would have to type some dot command (forget syntax).
ILC |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |