Help Wanted

c++ vs python – evdude

evdude

Member

Posts: 135
From: Earth Orbit
Registered: 03-14-2007
I was wondering how C++ compares to Python. I like Python, C++ seems to be used more. I'm thinking about switching to C++ but I'd like to know a few things first:

does C++ have tuples, lists, dictionaires,

and are there good 3D/2D modules for it?

------------------
"trust in the lord with all your heart and lean not on your own understanding, in all your way's, acknowledge him and he will direct your path" proverbs 3:5-6

[This message has been edited by evdude (edited April 09, 2007).]

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
1: Not really. It has arrays. There are probably libraries that can add that functiona

2: Yes...

jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
the standard template library gives C++ lists, queues, stacks, and a TON of other functions, algorithms and data structures you've never heard of

Edit: as for tuples, we have what's called a structure that handles stuff like that.

EdiT: come to think of it, i'm fairly sure that python is written in c... or at least popular implementations of it would be. in that case c++ should have everything python offers and more...

[This message has been edited by jestermax (edited April 09, 2007).]

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
Good luck wrestling with the STL.
jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
STL owns your computer

------------------
Visit my portfolio (and check out my projects):
http://Jestermax.googlepages.com/

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
Not mine.

evdude, C++ has better libraries and runs faster, but you can usually program faster(and with less bugs) in Python. It depends on what you want to make...

jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
That's probably true from a RAD standpoint. if you're switching to C++ then prepare for hard work, but don't worry about the capabilities of C++

------------------
Visit my portfolio (and check out my projects):
http://Jestermax.googlepages.com/

Matt Langley
Member

Posts: 247
From: Eugene, OR, USA
Registered: 08-31-2006
I think the key statement here is:

quote:
It depends on what you want to make...

Certain things will be 'done' faster in different languages. Also consider that getting something done is not the same thing as getting something functional... actually finishing something takes a good amount of work no matter what the language

------------------
Matthew Langley
Lead Documentation Engineer
GarageGames

CPUFreak91

Member

Posts: 2337
From:
Registered: 02-01-2005
quote:
Originally posted by evdude:
I was wondering how C++ compares to Python. I like Python, C++ seems to used more. I'm thinking about switching to C++ but I to know a few things first:

They both have their purposes. C++ is commonly used in Python modules (such as game engines) because interpreted languages are a bit slower than compile-able languages. It also depends on what you're going to want to do.
I do most everything in Python right now because I am most comfortable programing a small program in Python. When I get into Linux kernel programming I will be touching C/C++ (mainly C) because it's what is primarily what the kernel is written in.

Every programming language has it's uses. Consider what you want to do with it and then decide. Going with a language because it seems to be popular or "better" isn't always the best idea.

------------------
All Your Base Are Belong To Us!!! chown -r us ./base
"After three days without programming, life becomes meaningless.'' -- Tao of Programming Book 2

"Oh, bother," said the Borg. "We've assimilated Pooh."

"Socialism works great... if there are no people involved." -- Pastor David Ginter, Union Church of Guatemala.

My Programming and Hacker/Geek related Blog

evdude

Member

Posts: 135
From: Earth Orbit
Registered: 03-14-2007
well, I'm willing to work harder for better stuff. How much does C++ cost? were would I dowload/buy it? What are the 3D/2D modules called?

------------------
"trust in the lord with all your heart and lean not on your own understanding, in all your way's, acknowledge him and he will direct your path" proverbs 3:5-6

[This message has been edited by evdude (edited April 09, 2007).]

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
You can get C++ compilers for free. Just takes some looking around. There are alot of 3D/2D libraries also - just look around for them. (Google helps...)
jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
You'll want an IDE:
-Visual Studio 2005 is a good C++ IDE which you can get for free as the "Express" version.

-Dev-C++ is another decent compiler. I prefer this one for smaller projects and i started out coding in this. It takes away a lot of the complexity of visual studio i find (especially the linker stuff), but it has no debugging.

both are free btw.

------------------
Visit my portfolio (and check out my projects):
http://Jestermax.googlepages.com/

evdude

Member

Posts: 135
From: Earth Orbit
Registered: 03-14-2007
*gasp!*
cool! I was hoping I could get one for free!
ummmm...(searches google, doesnt find anything) were could I find one?

------------------
"trust in the lord with all your heart and lean not on your own understanding, in all your way's, acknowledge him and he will direct your path" proverbs 3:5-6

jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
VS 2005:
http://msdn.microsoft.com/vstudio/express/downloads/

Dev-C++
http://www.bloodshed.net/devcpp.html

------------------
Visit my portfolio (and check out my projects):
http://Jestermax.googlepages.com/

evdude

Member

Posts: 135
From: Earth Orbit
Registered: 03-14-2007
Great! thanks!

(downloading)

------------------
"trust in the lord with all your heart and lean not on your own understanding, in all your way's, acknowledge him and he will direct your path" proverbs 3:5-6

[This message has been edited by evdude (edited April 09, 2007).]

dartsman

Member

Posts: 484
From: Queensland, Australia
Registered: 03-16-2006
How much does C++ cost??

First... LOL! C++ is a computer language, it's like saying "how much does English cost?"
Second... you don't pay with money, you pay with your time (ie, life).

I actually heard a story from a mate at work who's girlfriend worked at a help desk and received a call from one gentlemen saying "I'd like to purchase C++", she even tried to explain to the guy he could just download a free IDE + Compiler from Microsoft, he wasn't interested... :|

Anywho, heres some links to some tutorials for you:
http://www.cplusplus.com/doc/tutorial/
http://www.cppreference.com/
http://www.cprogramming.com/tutorial.html

You should also buy a decent C++ book...

------------------
Junior Programmer www.auran.com
Quality Assurance Lead www.rebelplanetcreations.com

Cohort X

Member

Posts: 126
From: The Great Pacific Northwest
Registered: 09-16-2006
quote:
Originally posted by dartsman:

You should also buy a decent C++ book...


There you go with the add ons and hidden fees.
Please just show me where the C++ is kept and I'll drive it off the lot.

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
I bought a BlitzBasic once. Are C++s more expensive?

jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
Come on guys, be nice. If evdude knew all about this stuff he wouldn't be asking for our help.

------------------
Visit my portfolio (and check out my projects):
http://Jestermax.googlepages.com/

evdude

Member

Posts: 135
From: Earth Orbit
Registered: 03-14-2007
yeah! what he said!

------------------
"trust in the lord with all your heart and lean not on your own understanding, in all your way's, acknowledge him and he will direct your path" proverbs 3:5-6

dartsman

Member

Posts: 484
From: Queensland, Australia
Registered: 03-16-2006
I'm glad to see another keen volunteer for C++ we need more... hence why I provided him with the links to learning material and the advice...

it is though rather amusing the whole 'how much does C++ cost'... cause for me it would have cost at least $10,000 over the years (1 $4,500 laptop, 1 $2,500 desktop, $1,000 in books, $500 in mags, and about $1,500 in hardware and software, let alone everything else I have forgotten) and about 5 years of my life (so far :P).

It's an expensive hobby, and now my career

------------------
Junior Programmer www.auran.com
Quality Assurance Lead www.rebelplanetcreations.com

jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
i think i got a better deal on my computing career
1 $1,800 for laptop, 2 Free Desktops, Bunch of money: books
All in Canadian dollars
although i AM about to blow a bunch of money on a new computer...but it won't cost me as much as your laptop did

------------------
Visit my portfolio (and check out my projects):
http://Jestermax.googlepages.com/

evdude

Member

Posts: 135
From: Earth Orbit
Registered: 03-14-2007
I downloaded dev-C++, and its working great!

by the way, I got my laptop for free (and I wish I had money to blow)!


------------------
"trust in the lord with all your heart and lean not on your own understanding, in all your way's, acknowledge him and he will direct your path" proverbs 3:5-6

[This message has been edited by evdude (edited April 10, 2007).]

jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
that's great. i personally suggest that you start off with dev-c++ to learn c++. it's easy to use and doesn't attack you with features. once you get crazy-good at it, you might consider checking out VS2005 though, but i suggest it only after you learn more about both the syntax and the C++ compiler (as in what a linker is)

------------------
Visit my portfolio (and check out my projects):
http://Jestermax.googlepages.com/

evdude

Member

Posts: 135
From: Earth Orbit
Registered: 03-14-2007
yeah, I like it to. Umm, is there a 2D game engine like pygame that I could download? and thanks for the tutorials dartsman!


------------------
"trust in the lord with all your heart and lean not on your own understanding, in all your way's, acknowledge him and he will direct your path" proverbs 3:5-6

jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
well, for c++, there is (but not limited to):

SDL- not a game engine, but a media layer. which means it'll draw your objects, etc but you have to make it into a game

Allegro- never touched it but heard a few nice things
http://www.talula.demon.co.uk/allegro/

HAAF- a new game engine featuring hardware accelerated 2d graphics
http://hge.relishgames.com/overview.html
Edit: don't use HAAF, it's missing a ton of features (like collision detection)

[This message has been edited by jestermax (edited April 10, 2007).]

spade89

Member

Posts: 561
From: houston,tx
Registered: 11-28-2006
hey c++ is the industry standard language and it's fun it's my favorite language(although i been using java lately).

i second the cprogramming.com tutorials and if you are interested you should check out java too. but you should stick with c++ for the moment.

google for "turbo c++ explorer" that's a neat ide and it's free but 390mb's and the code blocks ide is really nice here is the link for that:
http://www.codeblocks.org
and you should check out these threads at ccn:
http://www.christiancoders.com/cgi-bin/ubb-cgi/postdisplay.cgi?forum=Forum6&topic=000267

http://www.christiancoders.com/cgi-bin/ubb-cgi/postdisplay.cgi?forum=Forum6&topic=000254

------------------
John 14:6

Jesus answered, "I am the way and the truth and the life. No one comes to the Father except through me.

dartsman

Member

Posts: 484
From: Queensland, Australia
Registered: 03-16-2006
yes well, I wasn't really 'blowing' $4,500 (AU not USD)... but rather buying a top of the line Laptop for University, and it got me well through Uni. Mind you, it's now almost out of date (about 2-3 years old), but would still cost me around $2,000... hehe

I also have plenty of free PC's... my latest one was a Athlon 1.4Ghz, 256Mb DDR RAM, 64Mb Geforce2 hehe, and about 16Gb harddrive, also dvd + cd (x2) + floppy + zip drives... wanting to get around to old-school demo coding in Asm and C...

------------------
Junior Programmer www.auran.com
Quality Assurance Lead www.rebelplanetcreations.com

evdude

Member

Posts: 135
From: Earth Orbit
Registered: 03-14-2007
wow! an out-of-date computer for the price of an cheap car! were are you getting the free desktops?

------------------
"trust in the lord with all your heart and lean not on your own understanding, in all your way's, acknowledge him and he will direct your path" proverbs 3:5-6

dartsman

Member

Posts: 484
From: Queensland, Australia
Registered: 03-16-2006
Work goes through a lot of hardware.. plus one guy a work had a whole tonne of old hardware he wanted to get rid of..

Wasn't out of date when I bought it and luckily for 5 months after (I hate when they go out of date within like a week or so.. as they usually do)..

------------------
Junior Programmer www.auran.com
Quality Assurance Lead www.rebelplanetcreations.com

evdude

Member

Posts: 135
From: Earth Orbit
Registered: 03-14-2007
quote:
Originally posted by jestermax:
Edit: don't use HAAF, it's missing a ton of features (like collision detection)

Ooops! I downloaded it before I saw the EDIT!

------------------
"trust in the lord with all your heart and lean not on your own understanding, in all your way's, acknowledge him and he will direct your path" proverbs 3:5-6

[This message has been edited by evdude (edited May 12, 2007).]

jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
whoops it's not that it's dangerous or anything, it's just got a ways to go before it's useful. it DOES look neat though; hardware accelerated graphics with a particle system....

------------------
Visit my portfolio (and check out my projects):
http://Jestermax.googlepages.com/

evdude

Member

Posts: 135
From: Earth Orbit
Registered: 03-14-2007
Ok, I'm doing SDL. I wanted to do it anyway becuase I like pygame, which uses SDL.

------------------
"trust in the lord with all your heart and lean not on your own understanding, in all your way's, acknowledge him and he will direct your path" proverbs 3:5-6

TwoBrothersSoftware

Member

Posts: 141
From: Janesville, Wi USA`
Registered: 08-05-2006
quote:
Originally posted by evdude:
Ok, I'm doing SDL. I wanted to do it anyway becuase I like pygame, which uses SDL.


I'm using SDL and C++ did have to install a couple other libraries to get what pygame offers - but with gui-chan it looks like a pretty good package (IMHO)

steveth45

Member

Posts: 536
From: Eugene, OR, USA
Registered: 08-10-2005
quote:
Originally posted by dartsman:
It's an expensive hobby, and now my career

Ditto.

------------------
+---------+
|steveth45|
+---------+

evdude

Member

Posts: 135
From: Earth Orbit
Registered: 03-14-2007
quote:
Originally posted by TwoBrothersSoftware:
I'm using SDL and C++ did have to install a couple other libraries to get what pygame offers - but with gui-chan it looks like a pretty good package (IMHO)

what are those other libraries?

BTW dartsman and steveth45: robotics is more expensive

------------------
"trust in the lord with all your heart and lean not on your own understanding, in all your way's, acknowledge him and he will direct your path" proverbs 3:5-6

[This message has been edited by evdude (edited April 20, 2007).]

TwoBrothersSoftware

Member

Posts: 141
From: Janesville, Wi USA`
Registered: 08-05-2006
quote:
Originally posted by evdude:
what are those other libraries?

BTW dartsman and steveth45: robotics is more expensive


sdl_Mixer SDl_ttf and I think rotozoom which I don't use

evdude

Member

Posts: 135
From: Earth Orbit
Registered: 03-14-2007
quote:
Originally posted by TwoBrothersSoftware:
sdl_Mixer SDl_ttf and I think rotozoom which I don't use

yeah, I just downloaded those and with the tutorials at http://cone3d.gamedev.net/

------------------
"trust in the lord with all your heart and lean not on your own understanding, in all your way's, acknowledge him and he will direct your path" proverbs 3:5-6

TwoBrothersSoftware

Member

Posts: 141
From: Janesville, Wi USA`
Registered: 08-05-2006
quote:
Originally posted by evdude:
yeah, I just downloaded those and with the tutorials at http://cone3d.gamedev.net/


It's not that hard - but it's not quite the ease of pygame.

Here is another site that talks about several useful tutorials

http://lazyfoo.net/SDL_tutorials/

evdude

Member

Posts: 135
From: Earth Orbit
Registered: 03-14-2007
quote:
Originally posted by TwoBrothersSoftware:
It's not that hard - but it's not quite the ease of pygame.

Here is another site that talks about several useful tutorials

http://lazyfoo.net/SDL_tutorials/


Wow! that site looks better than cone3D!
and your right about pygame, it is easier.

------------------
"trust in the lord with all your heart and lean not on your own understanding, in all your way's, acknowledge him and he will direct your path" proverbs 3:5-6

[This message has been edited by evdude (edited May 12, 2007).]