C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 26th, 2002, 07:00 PM
linkangels linkangels is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 0 linkangels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question I'm new to c++ & I need help!

Hi.

I want to learn C++ to create programs in Linux. But I am a complete newbie (I've done programming in VB & PHP though).

What do I need & what tutorials do you recommend.

Thank you.

Reply With Quote
  #2  
Old March 26th, 2002, 07:19 PM
dcaillouet's Avatar
dcaillouet dcaillouet is offline
Big Endian
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2001
Location: Fly-over country
Posts: 1,173 dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 29 m 5 sec
Reputation Power: 24
Here's a good free book to get you started:
http://www.mindview.net/Books/TICPP...ingInCPP2e.html

Currently there's another thread on free Linux IDEs:
http://forums.devshed.com/showthrea...2813&forumid=42

The LinuxDoc website has a HOWTO programming section:
http://www.linuxdoc.org/HOWTO/HOWTO...rogramming.html

Because I do most of my work from a Win2k laptop, I usually write the bulk of my code using UltraEdit (www.ultraedit.com) and save my files to my Linux box via ftp. This of course is a personal preference. You can always use vi.

Start off with Hello World! and build from there...

Reply With Quote
  #3  
Old March 26th, 2002, 09:42 PM
linkangels linkangels is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 0 linkangels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks!

Tahnk you very much! I need all the help I can get <grin>

Reply With Quote
  #4  
Old March 29th, 2002, 03:25 AM
p3rlm0nk p3rlm0nk is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: Houston, TX USA
Posts: 0 p3rlm0nk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to p3rlm0nk
hey

OK, the whole thing with programming on linux is that there are really two schools of approaching the "process" of programming:
IDE and command line. Which you prefer will depend on what
you have to do (GUI work tends to be pretty much IDE-centric, server coding is usually command line work, etc) and your personal preferences. The cool thing about unix is that, becuase the command line is so well developed, programming there is just as easy as pointing and clicking at an IDE.

That said, IMHO, as a newbie you should use the command line tools (or at least, some editor you like and the command line to
invoke the compiler and such). Why? Becuase that is actually simpler than most IDEs (open up the options dialog sometime in VC++, heh), the knowledge is more "portable" (what happens if you only know, say, Visual C++ but then you have to
use CodeWarrior on a job?), and it gives you a better "feel" for what's going on as code becomes programs...

I strongly second the recommendation of Bruce Eckel's "Thinking in Foo" line of texts. The java one is excellent, and what I've seen of the C++ one is as well. There are varying schools of thought
about whether you should learn C, I say go for it becuase gaining
a useful working knowledge of C is not hard (say, up through non-esoteric uses for pointers, structs, that sort of thing) and once you learn C you've got an immediate head start on several languages (C++, Java, Perl, etc.). There are of course conceptual differences between how you think to be a good C++ programmer
and a good C programmer, but pointers are pointers. If you do want to learn C, there are many good books. I really like the Steve Oualline (sp?) O'Reilly (cow) C book, and of course "The C Programming Language" by Kernhigan and Ritchie (addison wesley?) is the classic in the field. If you want a book that focuses on the TOOLS rather than the LANGUAGE, then o'reillys
(swan) book "Programming with GNU Tools" is good as it provides useful introductons to the common range of gnu programming utils (and fundamentally, linux is a kernel with a thick coat of GNU).

Before you spend a fortune on books, you may wish to look into URL they usually beat the other online booksellers on price and their service, as far as I've seen is flawless. My only gripe is that for some reason they don't carry books published by Manning (who has published some really great perl books, btw).

Anyway, here's a list of recommended programs to use:
COMPILER:
gcc/g++: naturally. free and decent. you do need to use g++
on c++ source, this is a common newbie error.

COMMAND-LINE EDITORS:
Nano (or pico, if you have pine installed): easy command line editor
Vim: somewhat more complex, but nicer editor for the command line
(some people like emacs, but that's probably as much work as
learning c++, heh)

VISUAL EDITORS:
Nedit: simple, pretty

DEBUGGERS:
gdb: command line debugger
ddd: very nice gui shell around gdb, it's facility for graphically monitering complex data structures is really nice

COMPILE AUTOMATION:
make: can't live without it for those big projects

MISC:
shell (bash, (t)csh, ksh, etc): learning the rudiments of
shell scripting will make your life easier in the long run as
a unix programmer for writing test scripts and other forms
of automation. there is a good howto on bash scripting
(it's got advanced in the title but starts off from zero) in the LDP.
perl: everyone's favorite glue language. it's not just for cgi, heh.
it's everything shell scripting is and more. It be all that and a bag of chips. Learning Perl by oreilly is a good starting point (I make my living coding perl).

(you didn't say what distro you're using, but if it's debian all these are apt-get'able, if it's (redhat/mandrake/corel/etc.) then you can probably find the right rpms either on your distro disk or at rpmfind.net)

Of course, the only thing programmers like to do more than sex in their spare time is code programs to make programming easier. So there are about a trillion and one utilties of various sizes and scopes for the myriad of tasks a working programmer faces, for example yacc and lex for writing custom languages (bison/flex from the gnu folks). Go for a browse on a site like freshmeat.net or something and you'll get a feel for what's out there.

OH, one last thing: after you've gotten up to speed on the basics of C++ (making classes, etc.), please please do yourself a favor and make an effort to learn how to use templates and the STL (standard template library), even if whatever book you got doesn't cover them. *These are absolute joy to work with.* (usually, heh) The STL is probably the thing i like best about C++.

Reply With Quote
  #5  
Old March 29th, 2002, 03:36 AM
p3rlm0nk p3rlm0nk is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: Houston, TX USA
Posts: 0 p3rlm0nk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to p3rlm0nk
oh...

good luck, btw. this will all likely seem Totally And Completely Alien to you (coming as you do from vb/php), but it can be fun if you stick with it. Keeping track of variable types will probably be the thing that trips you up the most at first (e.g. in php a $foo holds 1, "1", and "I am a string of text." with equal ease, but in C(++) respectively those would have to be held in an int, a char, and a char*/char array (pointers (something that points to a chunk of memory) and arrays are two side of the same coin, sort of, but I'll leave that for you to discover)).

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > I'm new to c++ & I need help!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway