![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 434
Rep Power: 4
![]() |
I agree with bigK, learn Python. C or C++ syntax is just too difficult to read for a beginner that wants to learn on his/her own. Go to the Python.org website and download the latest version I think it is Python25 and install it. Python comes for a large number of different systems, like Windows, Linux, MacUnix, so download the right version. In the ".\Python25\Lib\idlelib\" folder you will find a file Idle.pyw, run that file, it is an IDE where you can write Python code in the editor and execute it as a program.
# this is typical Python code print '-' * 50 for x in range(10): print x print "Hey I can code in Python!" You can also use the Idle Python Shell (has >>> prompt), where you can test short Python code one liners on the fly. Type something like 355/113.0 and it will give you pi once you press the enter key. Compared to C++ Python is a very high level language with a large amount of modules, a nifty memory manager, and many elegant ways to solve a problem. This short Python code will print the calendar for the month of March 2007: import calendar calendar.prmonth(2007, 3) Want to know more, just ask in the Python forum here!
__________________
I looked it up on the Intergnats! Last edited by Dietrich; Mar 15th, 2007 at 12:57 AM. |
|
|
|
|
|
#12 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
"wat" you need to do is try harder or learn to search better or give up. it's NOT that hard. read the tutorial a million times if it takes that. oh yeah, and stop that 1337 spelling crap, you come off like an ignorant asshole.
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#13 | ||||
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 243
Rep Power: 3
![]() |
Quote:
Quote:
Quote:
I disagree with you on this one, too. This is the reason. Quote:
__________________
Project::Soulstorm (personal homepage) |
||||
|
|
|
|
|
#14 | ||
|
Programmer
Join Date: Jun 2006
Location: England London
Posts: 72
Rep Power: 3
![]() |
Quote:
|
||
|
|
|
|
|
#15 |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: UK
Posts: 215
Rep Power: 3
![]() |
I can see no possible benefit you would get from learning C instead of C++ on the off. Just more work when you need to make the switch in my opinion.
|
|
|
|
|
|
#16 |
|
Newbie
Join Date: Mar 2007
Posts: 8
Rep Power: 0
![]() |
Thanks for all the posts.
And i never said i tried to learn both at the same time. I tried to learn C++ couldnt find a good program to run it on, so someone recommended me to learn python first. |
|
|
|
|
|
#17 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
probably the only major benefit would be in character strings and arrays...C forces you to deal with that issue. it just gives you a better understanding of what a char* actually is. although with new libraries, this is probably irrelevant.
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#18 | ||
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Quote:
Quote:
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
||
|
|
|
|
|
#19 | |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 243
Rep Power: 3
![]() |
Quote:
__________________
Project::Soulstorm (personal homepage) |
|
|
|
|
|
|
#20 | |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,221
Rep Power: 5
![]() |
Quote:
There are some cases where code that will be accepted by a 1989-standard-compliant compiler will fail to compile, or compile with different results, when fed to a C++ compiler. Most of the code that won't compile uses features that are rarely used in C, or are generally considered poor practice in both C and C++. Annex C of the C++ standard describes the differences. This situation changed with the 1999 C standard, which introduced several language and library features that are incompatible with C++ language and library features. Some of them are quite significant, to the extent that some features of C99 have the same name as some C++ features but different meaning. In fact, there is occasionally some speculation that some of the incompatibilities introduced in the 1999 C standard were deliberate (i.e. that some incompatibilities were introduced to increase incompatibilities with C++) because the specifications seem rather contrived eg relying on "compiler magic" -- something that the 1989 C standard went to some lengths to avoid -- or having a name that is the same as a C++ keyword but, in C99, is a macro which expands to a keyword with an underscore as a leading character. Since #define'ing keywords yields undefined behaviour in both languages, and names with leading underscores are reserved to implementations, this means there is no way of using those features in code without upsetting either a C or a C++ compiler. And some of the features (bool, true, false, complex) are the sort that programmers will often use. |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|