New programming language...

Discuss whatever you want here--both QB and non-QB related. Anything from the DEF INT command to the meaning of life!

Moderators: Pete, Mods

Post Reply
User avatar
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

New programming language...

Post by Patz QuickBASIC Creations » Fri May 05, 2006 4:33 pm

OK peeps, listen up. I am going to start learning C++ (got a couple books from the public library). Anything I should know before starting? (I know about having to declare ALL your variables, extreme case-sensitivity, etc.)

Don't worry. I won't leave the QB scene. It has too great of a QB-mmunity. :wink:

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re » Fri May 05, 2006 5:01 pm

C++ sucks,

There.. enjoy learning it...
I have left this dump.

User avatar
The Awakened
Veteran
Posts: 144
Joined: Sun Aug 07, 2005 1:51 am

Post by The Awakened » Fri May 05, 2006 5:07 pm

Check out my 2 C++ articles in QB Express. They're sloppy (IMO) but I heard some good things about them.
"Sorry for beating you up with a baseball bat Julian, but I DID think that you were a samsquanch."

User avatar
Deleter
Veteran
Posts: 119
Joined: Sat May 07, 2005 7:31 pm

Post by Deleter » Sat May 06, 2006 3:37 pm

um;
there; is; something; that; I; was; going; to say; but; I; forgot; what;

[ERROR: say not right]

;)


(hint: remember those damn semicolons!);

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Sat May 06, 2006 4:20 pm

Hmm... I have a C book at my house. It's C Programming Tips & Tricks: The Things they are Hiding from You.
Image

BDZ
Coder
Posts: 49
Joined: Sun Nov 20, 2005 5:41 pm
Location: Wisconsin
Contact:

Post by BDZ » Sun May 07, 2006 12:28 pm

Whatever you do, don't waste your money on the book "SAMS Teach Yourself C++ in 24 Hours" by Jesse Liberty (c) 2002. In 24 hours they show you all the weird things that C++ can do (and FreeBasic can probably do) without EVER showing you any useful way to apply it. I gave up on C++ after I realized that QuickBasic (or FreeBasic) does everything that I want.

User avatar
AlienQB
Newbie
Posts: 9
Joined: Mon May 08, 2006 11:39 am
Location: Sweden
Contact:

Post by AlienQB » Tue May 09, 2006 9:33 am

If you're into used to a static environment, like QB, an approach to an object-oriented language (C++, Java...) can be quite confusing. Learning a new syntax isn't hard, but adjusting how your brain normally thinks is. :)
The one and only.
AKA xerent

User avatar
Deleter
Veteran
Posts: 119
Joined: Sat May 07, 2005 7:31 pm

Post by Deleter » Tue May 09, 2006 4:38 pm

BDZ wrote:Whatever you do, don't waste your money on the book "SAMS Teach Yourself C++ in 24 Hours" by Jesse Liberty (c) 2002. In 24 hours they show you all the weird things that C++ can do (and FreeBasic can probably do) without EVER showing you any useful way to apply it. I gave up on C++ after I realized that QuickBasic (or FreeBasic) does everything that I want.
haha, got that book for like $15 after a bunch of sales and markdowns...now i know why >)

User avatar
Zim
Veteran
Posts: 98
Joined: Mon Dec 05, 2005 4:31 pm
Location: Wisconsin, USA
Contact:

Post by Zim » Wed May 10, 2006 12:31 pm

ok, I can top that! I gave up on learning C twice!

Oh, and, whatever you do, don't get a book called "C For BASIC Programmers" or something like that. If you're going to learn to code in C you'll end up writing code that looks like BASIC.

I did a little programming in Lisp. Sure enough, they look like BASIC programs!
--- Zim ---
--- Time flies like an arrow, but fruit flies like a banana ---

Guest
Veteran
Posts: 128
Joined: Sun Aug 14, 2005 8:33 pm
Location: Forest Lake, MN
Contact:

Post by Guest » Fri May 12, 2006 4:14 pm

I don't know why, but C++ was very confusing to me compared to C. C was a piece of cake. Windows Programming was difficult but easier than C++. PHP was easier than C++. Hell, any language is easier to learn than C++ except Java...

My advice: Learn C. It'll save yourself a lot of "um...what?". Then learn Objective C for OOP.

PlayerOne
Newbie
Posts: 6
Joined: Sun Nov 27, 2005 12:13 pm
Location: UK

Post by PlayerOne » Sat May 13, 2006 5:55 pm

I think Java is probably easier than C++ too. C++ has the problem that it is (more-or-less) an extension of C, and so all the good symbols were already used, and you end up with things like :: all over the place. And using -> all the time is extremely tiresome and typo-prone. It also muddies the cleanliness of C - in C, everything is ultimately an integer, C++ adds proper booleans.

I tend to feel that no-one who can program with any competence should have too much trouble switching between mainstream languages. Most FreeBasic programs can be translated line for line into C, and vice versa, especially if you're using external libraries like SDL. The big issues tend to be:

- Getting started: how do you set up projects, compile things, link to libraries, etc.
- Stepping up from console programs: graphics, IO, Windows.

Knowing C++ doesn't get you anywhere at all in writing a Windows app, you need to know how to compile a Windows exe and use the MFC and you need to understand the API and tedious stuff like that.

RyanKelly
Coder
Posts: 48
Joined: Sun Jan 22, 2006 6:40 pm
Contact:

Post by RyanKelly » Sat May 13, 2006 9:17 pm

I think the difficulty many people encounter when they are introduced to C++ is that there are different flavors to C++ programming. C++, like C, has an interesting division between syntax and standard routines.

Programmers who begin with Basic think less about syntax and more about the use of specific sets of commands. To the basic programmer, the only difference between PRINT and IF or CHR$ and FOR is the way in which they are used. They are all merely keywords used in different ways to accomplish different tasks. This mindset can prove to be a limitation in the long run.

With C, ones encounters an inherent split between keywords for data declaration and flow control versus standard library functions like getc(), printf(), putch(). To use standard functions in C, a programmer not only must learn how to use them but also which header file to include. One finds oneself checking reference material much more often. It takes a while for a beginner to start to "feel" this difference between the different aspects of their code.

C++ pushes this futher by introducing both an extended syntax AND a host of standard objects.

For example,

#inlcude <iostream.h>
void main()
{
cout << "Hello, World!";
return;
};


Although the cout object does embody much of the essence of the "strick C++ way", this bussiness of stream objects can be easily dispensed with if they are not needed. Never the less most general introductions to C++ toss this upon the beginner and leave them with the impression that C++ is wildly different from the sort of programming they have known. In this one example the beginner is shown a mysterious instantiation of a class with an over ridden operator without an introduction to the fundamentals.

I learned C++ from a specific demonstration of a serial port library built from the ground up through data structures, member functions, virtual base classes, etc. In this way each aspect of this "object oriented programming" made sense.

Post Reply