home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

G++ vs. VC++

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2047
Discussions: 200,950, Posts: 2,379,436, Members: 246,311
Old March 2nd, 2002, 05:07 PM   Digg it!   #1 (permalink)
Member
 
Join Date: Mar 2002
Location: BYU - Provo
Posts: 43
Send a message via AIM to Fractile81 Send a message via Yahoo to Fractile81
Question
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
Fractile81 is offline   Reply With Quote
Old March 2nd, 2002, 05:24 PM     #2 (permalink)
Member
 
SpiffGQ's Avatar
 
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".
SpiffGQ is offline   Reply With Quote
Old 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.
vass0922 is online now   Reply With Quote
Old March 3rd, 2002, 01:27 AM     #4 (permalink)
Ultimate Member
 
FalcomPSX's Avatar
 
Join Date: Oct 2001
Location: SoCal.
Posts: 2,853
Send a message via ICQ to FalcomPSX Send a message via AIM to FalcomPSX
hey...who you calling retarded?
__________________
FalcomPSX
FalcomPSX is offline   Reply With Quote
Old 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...
vass0922 is online now   Reply With Quote
Old March 3rd, 2002, 01:44 AM     #6 (permalink)
Ultimate Member
 
FalcomPSX's Avatar
 
Join Date: Oct 2001
Location: SoCal.
Posts: 2,853
Send a message via ICQ to FalcomPSX Send a message via AIM to FalcomPSX
i wasn't serious, i never made a endl funciton.
FalcomPSX is offline   Reply With Quote
Old March 3rd, 2002, 01:52 AM     #7 (permalink)
Not Really a Member
 
Join Date: Oct 2001
Posts: 25,386
Oh ok
vass0922 is online now   Reply With Quote
Old March 3rd, 2002, 02:04 AM     #8 (permalink)
Ultimate Member
 
FalcomPSX's Avatar
 
Join Date: Oct 2001
Location: SoCal.
Posts: 2,853
Send a message via ICQ to FalcomPSX Send a message via AIM to FalcomPSX
hey vass, how familiar are you with c++?
FalcomPSX is offline   Reply With Quote
Old 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...
vass0922 is online now   Reply With Quote
Old March 3rd, 2002, 02:47 AM     #10 (permalink)
ILC
Senior Member
 
ILC's Avatar
 
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
ILC is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
The disrespect of Obama by Russian .. (33)
Making Health Care Worse (176)
Is It Just Me? (2940)
Wireless Televisions. (12)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Regular Build (7)
radeon x850xt platinum & shader.. (6)
Is the PSU I received dead? (12)
Print spooler problem (15)
HIS HD5770 graphic card question (15)
Install XP pro and a Vista laptop ?.. (11)
windows vista security holes (9)
Dept. of HS: NSA 'Helped' Develop V.. (15)
Recent Discussions
Point and Shoot Camera Suggestions. (4)
Regular Build (7)
Multiple Restarts Required at Boot (2)
Ideal cheap graph card for PC-Gaming? (18)
radeon x850xt platinum & shader 3 (6)
Graphics Card Upgrade Question (4)
For Sale BFG GTX285 OC2 with 10 year .. (3)
How to convert MP3's (4)
Wireless Televisions. (12)
Laptop with wireless problem. (2)
Internet Lost (1)
Hp Artist Edition + Matching Bag (0)
My monitor won't turn on after instal.. (0)
Asus P4G8X Mobo (6)
Xbox 360 GTA: SA disk error (1)
Is the PSU I received dead? (12)
windows 7 internet problem (5)
BSOD On Startup (ntoskrnl.exe) (2)
Print spooler problem (15)
Have you switched yet? (86)
screen resolution vs monitor size (2)
sms storage to PC (0)
Open With ..... Win7 (0)
java code for fibonacci (1)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (35)


All times are GMT -4. The time now is 11:27 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28