C/C++?

Anything and Everything about Uplink

Moderators: jelco, bert_the_turtle, Chris, Icepick, Rkiver

FieldDoc
level2
level2
Posts: 207
Joined: Thu Mar 07, 2002 11:37 am
Location: Devon, UK
Contact:

Postby FieldDoc » Tue May 20, 2003 11:12 pm

Hi,

What's the difference between C and C++? I'm currently learning VB.NET but am considering dabbling with one of the above two. I don't intend to make a living from programming...more of a hobby.

Syrtis,
you are always saying how you are the VB 1337 man, I have a question for ya. I'm using VB.NET 2002 and wanna program my Pocket PC. I need the "smart device extensions" add-in (which comes as standard with 2003). Can't find it anywhere.....don't suppose you have a copy? (Not looking for warez PB.....SDE was a free download)

Thanks guys
MacBook 2Ghz, 2GB RAM, OSX 10.4.9
Personal Blog | Code Wars - The Hacking Game | Development Blog
Stewsburntmonkey
level5
level5
Posts: 11553
Joined: Wed Jul 10, 2002 7:44 pm
Location: Nashville, TN
Contact:

Postby Stewsburntmonkey » Tue May 20, 2003 11:28 pm

C++ was designed as an improved C but also a major structural change.  The biggest difference is that C++ is object oriented where as C is not.  There are also many little improvements in the library as well.  :)
ReflectingGod
level5
level5
Posts: 2725
Joined: Sun Mar 17, 2002 4:40 pm
Location: W. Australia

Postby ReflectingGod » Wed May 21, 2003 8:18 am

FieldDoc: I'd go with MS Visual C++ as it is easy to use and if you are used to the VB development environment, will leave you feeling just about at home....

I use VC++6.... I don't know if anyone finds .net better... never tried it....
ME!

Procrastination - Hard work often pays of after time, but laziness always pays off now!

**Bibo ergo sum!**
FieldDoc
level2
level2
Posts: 207
Joined: Thu Mar 07, 2002 11:37 am
Location: Devon, UK
Contact:

Postby FieldDoc » Wed May 21, 2003 10:53 am

Thanks,
Although, i'm a little worried about using Visual products, expecially as i'm (tentatively) considering writing a program for my newly acquired copy of Redhat
MacBook 2Ghz, 2GB RAM, OSX 10.4.9

Personal Blog | Code Wars - The Hacking Game | Development Blog
JohnWho
level2
level2
Posts: 154
Joined: Sat Mar 08, 2003 3:11 am

Postby JohnWho » Thu May 22, 2003 1:27 pm

In that case you're bound for problems, as the user interface stuff and some of the internal libraries in Visual C++ are limited to MS Windows.

If you want to do cross-platform programming (write programs that can be compiled on or ported to different platforms), then you'd have to use some other library for stuff like user interfaces, etc.
You might want to try wxWindows or SDL, though the latter isn't object oriented and doesn't bring stuff for user interfaces with it. Several games use SDL, though.

All in all, it might be best to first write programs just on one platform to learn C/C++, and since Visual C++ contains a GUI-builder and stuff, I guess it would be easier to use that for a start...
Check out sites like Code Project or CodeGuru for examples and tutorials on C/C++ stuff...
Stewsburntmonkey
level5
level5
Posts: 11553
Joined: Wed Jul 10, 2002 7:44 pm
Location: Nashville, TN
Contact:

Postby Stewsburntmonkey » Thu May 22, 2003 1:33 pm

Although you can write and compile non-Windows (non Visual) code in MS Visual C++.  Its a great compliler and IDE.  :)
ReflectingGod
level5
level5
Posts: 2725
Joined: Sun Mar 17, 2002 4:40 pm
Location: W. Australia

Postby ReflectingGod » Thu May 22, 2003 1:34 pm

Another thing is, a book on the language is a very useful tool. You can learn from it, then use it as a reference when you need it later.....
ME!



Procrastination - Hard work often pays of after time, but laziness always pays off now!



**Bibo ergo sum!**
Captain Chickenpants
level1
level1
Posts: 55
Joined: Tue Apr 22, 2003 2:51 pm
Location: Uk
Contact:

Postby Captain Chickenpants » Thu May 22, 2003 1:55 pm

I learned C from a book called Mastering C Programming http://www.amazon.co.uk/exec/obidos/ASIN/0333498429/ref=br_lf_b_h__4/202-5829260-2284630 and was pleasantly surprised when I got to university that it was the recommended text, and only cost about £5.00 at the time (it has since doubled in price but is still pretty cheap).

I would recommend learning C before progressing to C++ as C++ is a superset of C.

CC
Make something idiot proof, and someone will invent a better idiot.
------------------------------------------------------
http://uplink.stewsburntmonkey.com/profile.php?Captain%20Chickenpants
elDiablo
level5
level5
Posts: 3111
Joined: Thu Mar 14, 2002 12:23 pm
Location: London, UK

Postby elDiablo » Thu May 22, 2003 1:59 pm

however, learning C first, then C++ means you have to "forget" some of the stuff that is taken out, and re-learn over things :P

if you use a SAMS book (like me), it teachs as though you have never programmed before, it's very good
We dont stop playing cos we get old... We get old cos we stop playing.
ReflectingGod
level5
level5
Posts: 2725
Joined: Sun Mar 17, 2002 4:40 pm
Location: W. Australia

Postby ReflectingGod » Thu May 22, 2003 2:33 pm

I learnt from Ivor Hortons Beginning Visual C++ 6, which is an excellent choice. The first half of the book is how to program in C++. The second half is how to program for windows with the MFC and ActiveX, and all that other shit...

It is not too difficult to understand, though it helps if you have some past programming experience. I would recommend....
ME!



Procrastination - Hard work often pays of after time, but laziness always pays off now!



**Bibo ergo sum!**
Captain Chickenpants
level1
level1
Posts: 55
Joined: Tue Apr 22, 2003 2:51 pm
Location: Uk
Contact:

Postby Captain Chickenpants » Thu May 22, 2003 2:45 pm

I do think that the book I used was more useful for someone who already knew another language.

What is in C that is not in C++?
Make something idiot proof, and someone will invent a better idiot.
------------------------------------------------------
http://uplink.stewsburntmonkey.com/profile.php?Captain%20Chickenpants
elDiablo
level5
level5
Posts: 3111
Joined: Thu Mar 14, 2002 12:23 pm
Location: London, UK

Postby elDiablo » Thu May 22, 2003 3:04 pm

i dunno to put it simply :biggrin: im only just starting to learn C++, so dont take my word, i is teh n00b
We dont stop playing cos we get old... We get old cos we stop playing.
andrewas
level4
level4
Posts: 621
Joined: Sun Mar 16, 2003 10:57 pm
Location: Scotland

Postby andrewas » Thu May 22, 2003 3:10 pm

C is almost a subset of C++, every C feature is also in C++. It is possible to write code that acts differently between C and C++, and I think that C++ type checking is stricter.

But in general, if it compiles on an ANSI C compiler, it should compile on a C++ compiler.
Stewsburntmonkey
level5
level5
Posts: 11553
Joined: Wed Jul 10, 2002 7:44 pm
Location: Nashville, TN
Contact:

Postby Stewsburntmonkey » Thu May 22, 2003 3:25 pm

Most C++ compilers are also C compilers so they will let you mix the two languages pretty freely.  There are some places a C program will not compile on a strictly C++ compiler, ie main declaired improperly etc.  Also most of the changes simply depricate older functions to allow old code to still be compiled.  :)
Proxy Blue
level1
level1
Posts: 18
Joined: Wed May 14, 2003 1:14 pm
Contact:

Postby Proxy Blue » Thu May 22, 2003 3:31 pm

download Borland is free and will compile for you.
Proxy Blue Gamer                                                                                                                Who is Proxy Blue  

Return to “General”

Who is online

Users browsing this forum: No registered users and 17 guests