Posted: 4/4/2006 3:04:49 PM EDT
|
I want to write a relatively simple (I think) computer program. Can I just get a C/C++ for Dummies book? What software will I need, where do I buy it, and how much will it cost? |
|
cheapest way is to: 1. Download Linux 2. use g++ as your compiler 3. google "g++ tutorial" and/or "C++ tutorial" to learn how total price: $0.00 /******************* My first program (i think this is correct) *******************/ #include <iostream>; using namespace std; void main(){ cout << "hello world!"; } |
Forget C/C++. If you want to write a simple program, just download a Windows-compatible version of Perl and write the program in Perl.
|
No, use Python! |
I was being sarcastic. He hasn't even given us any idea as to what he want's the program to do or what platforms it needs to run on. C++ is pretty difficult for somone who doesn't know what they are doing, and C++ is probably one of the least flexible languages out there. Pearl would be a much better choice IMHO, but then again we don't know what he wants to do. |
|
I had my first computer class in University in 1982. Back then computer class meant taking computer language classes. I took FORTRAN, BASIC, PASCAL and two other languages I can't even remember. The first real program I wrote was to pick lotto numbers with highest odds based on previous drawings. I once won $59 on a lotto ticket. |
True. I don't know what his goal is. To teach himself some programming, or to have a small program do something. I can come up with an algorithm and write the Perl script pretty quickly. He would just have to install a Perl compiler on his PC, add the directory of the perl.exe to his PATH environment and I could just send him my program for one billion US dollars. |
|
IMHO Perl is cool for us programmers mainly because it lets us be sloppy. not having to declare variables and do type conversions is all well and good. However, I learned on C (and a bit of C++). C teaches good methods and enforces better methods of programming. Its a bit harder and doesn't allow you to be sloppy (least not as badly). Once you learn it, you pick up other languages pretty easy. IMHO Once you are there you are thankful for languages like perl which let you skip compiling and alot of things. But take note, there are things like performance penalties that can be an issue if you care about such things depending on what you are doing. IMHO -Foxxz |
Nope, it isnt but the numbers are killing me 10 print "hello world" 20 got line 10 |
for simple programs C++ isn't hard to learn that's what we learned on in my CS classes won't be taking full advantage of it's power, but c++ doesn't have to be complicated |
Well yeah of course. I'm just sayin'. Most of the profs and students while I was in school would just mix C and C++ anyways, declaring C++ headers and then using printf anyways. |
|
there are free c++ compilers for windows too math.claremontmckenna.edu/ALee/g++/g++.html |
>10 CLS >20 ? Howdy, y'all! >30 goto 10 There ya go. 5 points to the person who recognizes it. |
If you are looking for a book to help you I would say not to get the 'Dummies' series there are much better programing books out there trust me I have struggled through C++, JAVA, HTML, JAVA Script and PHP. There is plenty of free information that is very helpful on the web just google for it the more specific you get the better the search.
|
Try Java. There is no automated garbage collection in C and as a newbie it sucks to spend 3 days to find the simple typo that makes your program segfault without further error messages. Perl syntax is nice if you can program, but the sloppy syntax is going to give you some bad habits if you can't program anything else. |
A good debugger is a C/Java programmers best friend. I work with C folks who load there programs with printf() debugging statements. Most of the Java guys seem to do the same thing. Learning how to malloc() and free up the memory puts hair on your chest |
|
+1 on C++ as a way to learn to program. C++ is the structured programming language to learn. It developes good programming habits and is very portable. It works on PC's to embedded applications. It is even similar to VHDL which would help him if he ever wanted to do digital hardware. Now C++ may not be the easiest way to do what he wants. |
|
+1 on C++ as a way to learn to program. C++ is the structured programming language to learn. It developes good programming habits and is very portable. It works on PC's to embedded applications. It is even similar to VHDL which would help him if he ever wanted to do digital hardware. Now C++ may not be the easiest way to do what he wants. |
|
eww, JAVA (garbage collection is the devil) eww, C++ (double eww on g++) Perl is cool. G2 is cool also. Mixed C/ASM > all. btw I'm pretty sure 'endl' flushes the buffer whereas '\n' doesn't necissarily do so. (Remember iosteam is buffered output) There is a difference! |