Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 21 May 2013, 19:35
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Announcements
Puppy Chihuahua Alpha4 ISO available
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 5 of 5 [63 Posts]   Goto page: Previous 1, 2, 3, 4, 5
Author Message
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15109
Location: Paradox Realm

PostPosted: Sat 29 Mar 2008, 20:05    Post subject:  

Quote:
If this sort of thing appeals to you and you'd like to make a start, let me know and I'll see if I can help with starting you off in the right direction at least with various tips and tricks of the trade.


That would be fun . . . Very Happy
I have written one useful program in C but I believe c++ is a bit more forgiving . . .
Maybe a thread could be started in the 'Misc' forum section
so we can all share . . .
'Tronkels C++ Course" or some such?

Time to update my compiling page perhaps . . .
http://tmxxine.com/wik/wikka.php?wakka=CompilingCinPuppy

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
tronkel


Joined: 30 Sep 2005
Posts: 1047
Location: Vienna Austria

PostPosted: Sun 30 Mar 2008, 03:59    Post subject:  

Lobster wrote:

Quote:
I have written one useful program in C but I believe c++ is a bit more forgiving .


C++ is C but with classes and objects.

Lobster's quote above is true, but only in the sense that, depending on how you think, (and everyone thinks differently) by having classes available, you can more easily visualise in your head what exactly your program does (or should do). Basically though, C++ is no more "forgiving" as is C.

Ok here's a start.

Make a wise decision and go and blow a few quid on a really good C++ book. Much better and more comfortable than trogging through miscellaneous web sites looking for tutorials and references.

There are many C++ books available and it can be very hard to decide which is the one. Take a tip from me and go buy Deitel and Deitel "C++, How to Program" as your first C++ primer. Look here.
http://www.deitel.com/Books/CPlusPlus/CPlusPlusHowtoProgram6e/tabid/2046/Default.aspx

It looks as though the latest edition 6 takes the view that Classes ought to be included as early as possible in the course. This was previously not really the case, but is a change for the better IMHO.

The true Bible of C++ is the one written by Dr Bjarne Stroustrup. "The C++ Programming Language". This is really the horses mouth, since he is the one who created the language! Problem with this is that the sample code he provides could only really be described as "pseudo-C++" and is almost impenetrable for beginners. Having said that, this is a book you will need to have on your bookshelf, if you carry on with C++. So that's your second book purchase, but not straight away.

Some of these little cheap pocket- references can also be quite handy to have and don't cost much. The SAMS series are also not bad at all. Ivor Horton's ROX series might also be considered as an alternative to Deitel. Nicely presented and structured, but a teensy-weensy bit MS oriented - but still OK.

Most of your early efforts will be console programs. Sometimes these can be built quickly and can also be handy to use in Puppy on occasions. If your aim though, is to use C++ to write GUI programs, then you will have to also get involved with e.g. FLTK, QT or Anjuta at some point in the future - but not yet.

The puppy devx_xxx-sfs contains your C++ compiler, so you are already set up in this respect. If you are stuck on Windows then you'll need Bloodshed C++ or the Quincy IDE. Deitel has a free copy, of Visual C++ only very slightly crippled. Visual C++ is part of the MS Visual Studio suite - so does cost quite a bit. Good system though, if you need to program GUis for Windows.

First assignment. See if you can suss out how to use a Class called PuppyUser to write a "hello world" program. This Class should contain the private string data member "string forum_name" and public function member "string return_forum_name()"

It's all in the book! Don't forget the semi-colons after each statement!

_________________
Life is too short to spend it in front of a computer
Back to top
View user's profile Send private message Visit poster's website AIM Address 
prehistoric


Joined: 23 Oct 2007
Posts: 1210

PostPosted: Sun 30 Mar 2008, 08:06    Post subject: C++  

@Lobster,

No, my crustacean friend, C++ is not more forgiving. It has just about all the pitfalls of C, plus a whole new range of traps for the unwary.

Such luminaries as Bill Joy and James Gosling decided many years ago that the full language was likely to produce programs that were unmaintainable. The end result of their efforts, though certainly not their efforts alone, (and not exactly what they originally intended,) was Java.

Everyone who uses C++ productively seems to learn a subset of the language. The semantics of the full language are very hard to characterize completely.

@tronkel,

Jack, not being in enough trouble already, I built a new machine last week so I could find new problems. While testing alpha3 on that I ran across a problem which has apparently been in all Puppies with XOrg 7.2, the xvidtune application runs and produces a mode line, when used as directed, but even adding that to the conf file manually does not affect the next start of X. The effect is that xvidtune adjusts timimg during the first session, but fails to set this changed timing in later sessions. This is due to the same problem which stopped me from finding a work around for AJ's problem with i810 video. Rerwin has been working on xorgwizard in Dingo, does anyone know if this problem has been fixed?
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 5 of 5 [63 Posts]   Goto page: Previous 1, 2, 3, 4, 5
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Announcements
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0558s ][ Queries: 13 (0.0072s) ][ GZIP on ]