Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
BCM
User Panel

Site Notices
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?
Link Posted: 4/4/2006 3:08:52 PM EDT
[#1]
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!";

}

Link Posted: 4/4/2006 3:10:28 PM EDT
[#2]
Sure, just buy the C++ for dummies book. It'll have everything you need in there.
Link Posted: 4/4/2006 3:13:49 PM EDT
[#3]

Quoted:
Sure, just buy the C++ for dummies book. It'll have everything you need in there.



If the book comes with a compiler, then yes.  Otherwise david_g17 makes a good suggestion.
Link Posted: 4/4/2006 3:15:05 PM EDT
[#4]
PCGrasp is free and includes support/compiling for Java, C++, and Ada at the least.
Link Posted: 4/4/2006 3:17:21 PM EDT
[#5]

Quoted:
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?


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.
Link Posted: 4/4/2006 3:18:55 PM EDT
[#6]

Quoted:

Quoted:
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?


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!
Link Posted: 4/4/2006 3:19:28 PM EDT
[#7]
Be a man and use vi as your editor.
Link Posted: 4/4/2006 3:21:35 PM EDT
[#8]

Quoted:

Quoted:
Sure, just buy the C++ for dummies book. It'll have everything you need in there.



If the book comes with a compiler, then yes.  Otherwise david_g17 makes a good suggestion.



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.
Link Posted: 4/4/2006 3:21:50 PM EDT
[#9]
 
Link Posted: 4/4/2006 3:22:24 PM EDT
[#10]
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.
 
Link Posted: 4/4/2006 3:25:53 PM EDT
[#11]
Yeah depending on what you want to do, Perl and PHP are much easier to use and more 'useful' for every day tasks.  C/C++ has its main advantage in speed and systems programming.
Link Posted: 4/4/2006 3:28:01 PM EDT
[#12]
buy a used ibm as400, install cobol and program in cobol or rpg (cant remember the versions).
Link Posted: 4/4/2006 3:29:08 PM EDT
[#13]

Quoted:
Yeah depending on what you want to do, Perl and PHP are much easier to use and more 'useful' for every day tasks.  C/C++ has its main advantage in speed and systems programming.



+1 on Perl, kick ass language
Link Posted: 4/4/2006 3:35:31 PM EDT
[#14]

Quoted:
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.


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.
Link Posted: 4/4/2006 3:38:04 PM EDT
[#15]
There ya go


#include <iostream>
using namespace std;
int main()
{
    cout << "Hello World From About\n";
}
Link Posted: 4/4/2006 3:41:24 PM EDT
[#16]
10 RUN "KICK.ASS"
20 INPUT = "NAME"
30 IF "NECESARRY"="Y" THEN GOTO 10
40 END PROGRAM



Link Posted: 4/4/2006 3:41:45 PM EDT
[#17]

Quoted:
There ya go


#include <iostream>
using namespace std;
int main()
{
    cout << "Hello World From About\n";
}



You must use 'endl' it is the iostream way!!!
Link Posted: 4/4/2006 3:41:59 PM EDT
[#18]

Quoted:
Be a man and use vi as your editor.



Real men use Bourne too!

#!/bin/sh
echo "Hello"
Link Posted: 4/4/2006 3:42:37 PM EDT
[#19]

Quoted:

Quoted:
Be a man and use vi as your editor.



Real men use Bourne too!

#!/bin/sh
echo "Hello"



I prefer Bourne Again!
Link Posted: 4/4/2006 3:44:16 PM EDT
[#20]

Quoted:
10 RUN "KICK.ASS"
20 INPUT = "NAME"
30 IF "NECESARRY"="Y" THEN GOTO 10
40 END PROGRAM






OMG haven't seen that since TRS-80
Link Posted: 4/4/2006 3:46:58 PM EDT
[#21]

Quoted:

Quoted:
10 RUN "KICK.ASS"
20 INPUT = "NAME"
30 IF "NECESARRY"="Y" THEN GOTO 10
40 END PROGRAM






OMG haven't seen that since TRS-80



oh hell, i am reasonably sure its not even correct syntax.

would have been basic apple IIe
Link Posted: 4/4/2006 3:47:53 PM EDT
[#22]
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
Link Posted: 4/4/2006 3:48:51 PM EDT
[#23]

Quoted:

Quoted:

Quoted:
10 RUN "KICK.ASS"
20 INPUT = "NAME"
30 IF "NECESARRY"="Y" THEN GOTO 10
40 END PROGRAM






OMG haven't seen that since TRS-80



oh hell, i am reasonably sure its not even correct syntax.

would have been basic apple IIe




Nope, it isnt but the numbers are killing me
10 print "hello world"
20 got line 10
Link Posted: 4/4/2006 4:00:32 PM EDT
[#24]
kill -9
Link Posted: 4/4/2006 4:18:28 PM EDT
[#25]

Quoted:

Quoted:

Quoted:
Sure, just buy the C++ for dummies book. It'll have everything you need in there.



If the book comes with a compiler, then yes.  Otherwise david_g17 makes a good suggestion.



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.



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
Link Posted: 4/4/2006 4:22:15 PM EDT
[#26]

Quoted:

Quoted:
There ya go


#include <iostream>
using namespace std;
int main()
{
    cout << "Hello World From About\n";
}



You must use 'endl' it is the iostream way!!!



iostream, at least the older .h version would work with the escape character as well as endl
Link Posted: 4/4/2006 4:24:08 PM EDT
[#27]

Quoted:

Quoted:

Quoted:
There ya go


#include <iostream>
using namespace std;
int main()
{
    cout << "Hello World From About\n";
}



You must use 'endl' it is the iostream way!!!



iostream, at least the older .h version would work with the escape character as well as endl



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.
Link Posted: 4/4/2006 4:24:13 PM EDT
[#28]
+1 on Linux.  
Link Posted: 4/4/2006 4:38:34 PM EDT
[#29]
there are free c++ compilers for windows too
math.claremontmckenna.edu/ALee/g++/g++.html
Link Posted: 4/4/2006 5:01:44 PM EDT
[#30]

Quoted:
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?



>10 CLS
>20 ? Howdy, y'all!
>30 goto 10


There ya go.

5 points to the person who recognizes it.
Link Posted: 4/4/2006 5:35:26 PM EDT
[#31]
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.
Link Posted: 4/4/2006 5:39:41 PM EDT
[#32]

Quoted:
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.



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.
Link Posted: 4/4/2006 5:44:42 PM EDT
[#33]
If using Mac OS X, all the C/C++ goddies are included, just open a Unix shell and code away
Link Posted: 4/4/2006 5:50:09 PM EDT
[#34]

Quoted:

Quoted:
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.



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
Link Posted: 4/4/2006 5:51:51 PM EDT
[#35]
err code ID10T
Link Posted: 4/4/2006 5:57:40 PM EDT
[#36]
What do you want this program to do?
Link Posted: 4/4/2006 6:07:10 PM EDT
[#37]
+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.

Link Posted: 4/4/2006 6:08:22 PM EDT
[#38]
+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.

Link Posted: 4/4/2006 6:14:02 PM EDT
[#39]
eww, JAVA (garbage collection is the devil)
eww, C++ (double eww on g++)

Perl is cool. G2 is cool also.

Mixed C/ASM > all. C is user friendly - it's just picky about it's friends.

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!
Link Posted: 4/4/2006 7:16:00 PM EDT
[#40]

Quoted:
There ya go


#include <iostream>
using namespace std;
int main()
{
    cout << "Hello World From About\n" <<endl;
    return(0);
}



nitpick... Can't declare a function as an int and not return a value, though declaring it as int vice void is the correct C++ way...

:)
Close Join Our Mail List to Stay Up To Date! Win a FREE Membership!

Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!

You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.


By signing up you agree to our User Agreement. *Must have a registered ARFCOM account to win.
Top Top