C++ programming in LINUX

greenspun.com : LUSENET : All Things Final Fantasy II : One Thread

um.... i feel kind of wierd asking this, me having not posted on any kind of internet forum for a year or more, but... in the linux shell, gcc with the '-x ' switch is supposed to compile the source as c++ or c, whatever. however, when i have tried this (after getting tired of g++'s annoying silence) gcc still doesn't read the source. man, this really pisses me off....

-BigBren, formerly Sanmirado

-- Anonymous, July 23, 2002

Answers

Try this with gcc -x c++ and then with g++:

#include

long factorial(long a){ if (a > 1){ return (a * factorial(a - 1)); } else{ return (1); } }

int main(){ long userInput; cout << "Please enter a number--> "; cin >> userInput; cout << "Factorial is " << factorial(userInput); return 0; }

-- Anonymous, July 23, 2002


I don't use Linux. It sucks. Macintosh can kick Linux's ass! And PCs can too!

-- Anonymous, July 24, 2002

Linux runs on PC's! And Mac 0SX is based on Linux, or at least the UNIX shell. Man, you suck!

-- Anonymous, July 24, 2002

If you keep dissing Linux you're gonna get shot.

-- Anonymous, July 24, 2002

So you use linux? Well I never have used it but I know it can't play any good games. Macs can play some but you have to go to apple.com and go to the store and look under games. Marathon is a good game for Mac and is native to the Mac. It will run on PC too. Go to Bungie.com and do a search on it. It is like Doom. I don't hate linux but what is the point of using it on a PC anyway?

-- Anonymous, July 25, 2002


Linux is good and DOES play good games. You just need the right hookup.

However, the best OS is still Windows 95. Its what ME is based on (ME is good too).

-- Anonymous, July 25, 2002

Actully windows 98 is better in some ways. It can play all games made within the last few years. I consider it to be like 95 with more upgrades and stuff.

-- Anonymous, July 25, 2002

Oh yeah, Big Bren. No one tells me I suck and gets away with it unless they are my friends. *Heavyarms loads up* *Chic Chic* BABABABABABABABABABABABBABABABBABABABA. Take that Suckar.

-- Anonymous, July 25, 2002

'98 takes up a lot more space than '95, though....

-- Anonymous, July 25, 2002

Yeah, and 98 also is a memory hog that doesnt use DOS properly.

-- Anonymous, July 26, 2002


Yeah but if you have a pentium III or IV it should not matter too much because those models usally come with 20 gb of mem. Well on my laptop it is that way. Plus 95 is what 3.11 was like when 98 came out. Less games are made for 95 because of XP being new and cool[still has bugs though]. I think Medal of Honor:Frontline requires 98 or better to work.

-- Anonymous, July 26, 2002

i used my old windows 98 CD's as frisbees. fun fun fun. Oh, and NT is cool. I tried it at my dad's work. His computer is really old. I can get any version of windows for less $5 with the exception of 2000 which i can get for $10. So i can buy a LOT of frisbees for cheap. But i might as well just take a ton of those free AOL CD's at blockbuster. The person who told me to stop doesn't work there anymore. :)

-- Anonymous, July 26, 2002

Trowa, before I hurt you, shut your fucking mouth.

95 runs all those new games, including Medal of Honour. And when I say 98 is a memory hog, Im talking Ram-wise. It takes at LEAST 16mb to run, and prefers to have 24. 95 only needs 4mb of ram.

-- Anonymous, July 26, 2002

Medal of honor is cool for PS2, but i don't like it for computer. When i play a game on PS2, i can't get used to it on computer, and when i play a game on computer, i can't get used to it on PS2. Like Quake 3 arena. I am good at it on computer, but not PS2. Anyways, Trowa, you suck dude. Windows 95 is awesome. Fucking old school shit. And that's why I like it.

-- Anonymous, July 26, 2002

Well I don't hate 95. It is okay. Oh yeah, my friend has a PC with a Windows XP OS and it will not play C&C Red Alert 1.

-- Anonymous, July 29, 2002


can anyone help me help him?

-- Anonymous, July 29, 2002

Moderation questions? read the FAQ