Solved

Getting started in C++

Posted on 1998-05-29
22
240 Views
Last Modified: 2010-08-05
I currently know nothing about C++, but have lots of experience using macromedia director to make applications. How should I get started in C++ or other programming language? What applications do I need and how can I get them (free). What possibilities are available with these programming languages (what can you do with them?)?
0
Comment
Question by:TimJ
  • 10
  • 4
  • 3
  • +3
22 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 1164938
C++ is a huge language.  It takes considerable effort to master compared to most other languages.

I would start with a book or two.  Try "C++ How to Program" by Dietal and Dietal.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1164939
Opps.  Deitel and Deitel.

You need a C++ compiler for the computer you will be working on.  There are a few that a free, like the g++ compiler.  However, you will get what you pay for.  If you are serious about programming you should invest in a real compiler with integrated debuging and on-line help and lots of other features.  Which one will depend on the computer you use.

What possibilities?  You can write programs...  Can you be more specific?
0
 
LVL 11

Expert Comment

by:alexo
ID: 1164940
Tim, my recommendation for a C++ book would be "C++ Primer, 3rd edition" by Stanley Lippman.  However, I suggest you get a hang of an easier langage before tackling C++.
Visual Basic is OK as a first language (and powerful enough to write applications with).
Smalltalk is a very good language to learn object-oriented principles.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1164941
>> I suggest you get a hang of an easier langage before tackling C++.

That's what I was trying to say, but didn't, when I said C++ was huge and hard to master.  An anology would be that understanding C++ is like understanding what I say and understanding most other loanguages would be like understanding what Alexo says!

I think Pacal is a good language for learning programming concepts in.  It tends to inforce good programming style and oraganization.  This is important to learn because C doesn't so much.
0
 
LVL 11

Expert Comment

by:alexo
ID: 1164942
>> I think Pacal is a good language for learning programming concepts in.
Wirth languages tend to protect the programmer from himself :-)
Pascal has one serious drawback in that it is not pbject oriented so it will not prepare you for the programming paradigms C++ uses.  There are OO offshoots of Pascal (e.g., Delphi) though.
Also, keep in mind that C++ has its roots in C which is a programming language without seatbelts.  Several low-level concepts will have to be mastered if you want to avoid furstration.
0
 
LVL 2

Expert Comment

by:VEngineer
ID: 1164943
Do not learn another language before learning C++.  C++ is a totally different language than others and you need to think in C++ from the start.

C++ is nothing like programs like Macromedia stuff... this programming is not drag and drop, it is low level and you must understand how it works with the machine.  Take a course if possible.. it is the best way to learn programming for the first time.

I strongly suggest "C++ Program Design" by Cohoon and Davidson.  It is one of the most popular undergraduate texts.  It has an excellent approach to object oriented design.

Deitel and Deitel's "C++ How to Program" is also good book but towards the end it covers slightly more advanced material.. lots of examples.

I suggest starting with Cohoon and Davidson, then moving on to Deitel and Deitel as a secondary sourcebook.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1164944
>> Do not learn another language before learning C++.  
>> C++ is a totally different language than others and you
>> need to think in C++ from the start.

I believe it is best to learn structured program design is a simple language like pascal.  first learn the principles of programming and organization.  Then try C++.  There is no waste in doing it that way.  What you lean in another language like pascal, can be quickly applied to C++.

>>Deitel and Deitel's "C++ How to Program" is also good book but towards
>> the end it covers slightly more advanced material.. lots of examples.

Not only does it cover the advanced stuff.  It does a bad job of it.  Its the best I've found for the introductory and intermediate stuff.  But really, not so hot for the advanced.
0
 
LVL 2

Expert Comment

by:VEngineer
ID: 1164945
Actually, that is the greatest part about the Cohoon and Davidson text... it gives a good intro to structured programming in C++, but introduces objects early.  It allows the programmer to *use* classes first in programs, then when the structural programing is mastered, classes can be written easily.  The presentation in the text is excellent because it give a light introduction to API programming and software engineering too using simplified drawing classes.. something that is so necessary in today's environment, but so rarely addressed in texts.  The examples in this text are classic and fit so well to the concept being described.
Although C++ is more difficult than Pascal, with the right train of thought, it becomes very easy.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1164946
I'll have to look for the book.  But I feel that objects should not be used right away.  

My complaint about C++ is that the syntax is such a mess.  Beginners a likely to make a mistake that compiles and works wrong.  Or that doesn't compile and has a weird error message.  A beginner doesn't need that hastle.  The language should work for you, not against you.

Once you've a good idea of how programming works and how the language works, you can handle those issues.  but for a beginner it is too much.  
0
 
LVL 2

Expert Comment

by:VEngineer
ID: 1164947
Definitely get the text, I think you will be rather impressed at the presentation that the text gives.. All of the not so hot features of C are never mentioned (and shunned in the tips).  This book is C++ from the ground up, not a C text converted to cover classes like most others I have encountered (especially those C++ for dummies, or C++ in 21 days, etc...).

This (Cohoon and Davidson's C++ Program Design text) is a brand new approach sponsored by the National Science Foundation.  A lot of research has gone into presenting this method as a good way for beginners to learn object oriented programming and I think it is excellent.  The book is also an excellent reference for experienced programmers, giving tips (esp. style and software engineering stuff) that might not otherwise be discovered using more traditional texts.

The text is very new and I strongly suggest checking it out.  It has been adopted at over 150 institutions this year alone.

I agree with you totally that Pascal is a good structured language, but frankly, it's dead.  I used it in high school, found it enjoyable, but I found it as a setback to trying to understand classes.  I thought of classes as just another struct or record.  I came to my senses afterwards and understoood the full potential of classes after Cohoon and Davidson, as well as Lippman's C++ Primer, in a secondary course.

Pascal resources are somewhat difficult to find and it is not worth the hassle to the beginner.
I also agree that C syntax is not the best thing in the world either, but if it is covered properly, it should not be too much of a problem.  I only wish the compilers were more beginner friendly like Turbo Pascal's.  For beginners, I reccommend the borland environment.  Version 4.52 for Windows is available cheaply (since it is slightly older) but is excellent for beginners since it is not cluttered with additional Windows programming stuff.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1164948
>> For beginners, I reccommend the borland environment.

I use Microsoft VC, Borland C++ 5, and Borland Builder 3..  I use the borland for most compiles because it faster and conforms to the draft standard a little better, but when error messages start spewing out or I need to debug.  I switch to VC.  VC seems much more user frendly!  Much easier to use.  Much clearer error messages.  The debugger is far superior.    It is simply the slowest compiler in the world.

I'll look for the book though.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:TimJ
ID: 1164949
All very well, but if I get all these books on different things that you  are talking about do I then need some software to do the programming or is it like HTML where you just use text?
0
 
LVL 22

Expert Comment

by:nietod
ID: 1164950
From my first answer.

You need a C++ compiler for the computer you will be working on.  There are a few that a free,like the g++ compiler.  However, you will get what you pay for.  If you are serious about programming you should invest in a real compiler with integrated debuging and on-line help and lots of other features.  Which one will depend on the computer you use.

What computer platform are you working on?
0
 
LVL 11

Expert Comment

by:alexo
ID: 1164951
>> VC seems much more user frendly!  [...]  Much clearer error messages.
Hear hear!

0
 
LVL 22

Expert Comment

by:nietod
ID: 1164952
??? Maybe its too early.  But, Alex, I'n not getting it.
0
 
LVL 11

Expert Comment

by:alexo
ID: 1164953
>> Maybe its too early.  But, Alex, I'n not getting it.
I was agreeing with you.  Geez, people are so suspicious these days...

An example: If you invoke a method of a class but forget to #include its definition, VC will tell you that the class is not defined while BC will tell you that the method is not a part of the class...
0
 

Author Comment

by:TimJ
ID: 1164954
I want to learn, but the most important thing is that IT HAS TO BE FREE! Please, if anyone has a copy that I could 'borrow', (just to test) and I will give it back, or if anyone knows where I could get it free of the internet I would be most obliged...
0
 
LVL 22

Accepted Solution

by:
nietod earned 50 total points
ID: 1164955
The G++ compiler is available for free.  It is kept up to the current standard.  But it is much harder to use than VC or even BC.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1164956
You can find it by searching for G++ or GNU on the web.  
0
 

Expert Comment

by:jmelia
ID: 1164957
Very cheap and legal VC 5.0 are available on the web.  See the news sites for ba.computers (bay area computers) and similiar news sites.   While this stuff is not free it is very cheap; $69-89.  Best of luck.

Another avenue: An used copy of VC 4.2 might be available from someone.
University bookstores often carry educational editions.
0
 
LVL 1

Expert Comment

by:Booth882
ID: 1164958
TimJ, the truth of the matter is that you cant expect to come in to something like this without laying down a little dough.  compared to the time you put into programming the initial cost is nothing.  believe me, you could earn alot of money with the hours you spend on your programs.  if you really want to program you must pursue it.  dont let a measly hundred dollars keep you away.  
0
 

Author Comment

by:TimJ
ID: 1164959
Thanks very much for all your help guys, I really appreciate it like I think nietod will appreciate the points.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now