C or C++?

Esbil

Junior Member
Dec 15, 2005
8
0
0
I've done some light programming over the last few years (VB.NET, some C#, perl, php) and have recently decided that I would like to dip my toe in the water when it comes to programming in C.

Thing is, I'm not exactly sure where to start. I'm very familiar with the basic to intermediate skills needed for programming. Should I start with a good basic C book and then move onto C++? Or can I come out of the gate learning C++?

Any suggestions on books would be greatly appreciated as well.

TIA,

Esbil

*edit* Forgot to add that I will be using Visual Studio.NET 2003 as my compiler. Not sure if that makes a huge difference, but I already have a copy because of a few classes I took.
 

scottish144

Banned
Jul 20, 2005
835
0
0
C++ FTW. C is just C++ without object orientation. Also, if u know C++ u can easily learn Java and C (the syntax is virtually identicle).

As for good books, I recommend Deitel and Deitel's "C++ How to Program" U can find all of their books here: http://www.deitel.com/books/index.html
Their "Java How to Program" book is my Programming Bible. Their books are really well structured. They start off with basic computer theory (how a computer works at machine-code level) and scale up to the most advanced concepts and methods.
 

Esbil

Junior Member
Dec 15, 2005
8
0
0
Thanks scottish144 - I think I'll give that book a look-see. I'm finding the main difference between the "lesser" programming languages that I have used in the past and C/C++ is memory management which I know almost nothing about (stacks/heaps/etc).
 

hooflung

Golden Member
Dec 31, 2004
1,190
1
0
Deitel and Deitel books are quite honestly the most horribly written programmings books I have ever laid eyes on. The amount of content covered in each book is too comprehensive to the point of vague on explanation. Its quality vs quantity and they tip the scales of quantity with a chevy 1 ton trucks. They remain the most popular at vocational and community colleges for a reason, lazy teachers.
 

hooflung

Golden Member
Dec 31, 2004
1,190
1
0
Oh and you should be working with C# *gasp never thought I would say that* as it will give you atleast a more pure object oriented approach by default than C++. Developers should never have had to manage memory this long. If you aren't going to be making games or portable software ( blind yourself to the mono project ) then C# is the way to go. Possibly even dip into Delphi for .NET at some point.
 

Esbil

Junior Member
Dec 15, 2005
8
0
0
Originally posted by: hooflung
Deitel and Deitel books are quite honestly the most horribly written programmings books I have ever laid eyes on. The amount of content covered in each book is too comprehensive to the point of vague on explanation. Its quality vs quantity and they tip the scales of quantity with a chevy 1 ton trucks. They remain the most popular at vocational and community colleges for a reason, lazy teachers.
So do you have a suggestion? Or did you just need to vent?

Originally posted by: hooflung
Oh and you should be working with C# *gasp never thought I would say that* as it will give you atleast a more pure object oriented approach by default than C++. Developers should never have had to manage memory this long. If you aren't going to be making games or portable software ( blind yourself to the mono project ) then C# is the way to go. Possibly even dip into Delphi for .NET at some point.
I've done quite a bit of work in .NET (primarily in VB.NET, but some C# as well). The problem I face is when vendors provide SDKs that offer only C++ functionality. I'd really like to get a handle on the subject so I could tap into anything possible.

Appreciate the responses, btw.

Esbil
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
C works for heavy embedded RTOS applications.

C++ is fine to start from as long as you do not choose to go back into C; No habits (bad and good) can cause problems, by forgetting and/or not have the STL & OO available to you in C.

If possible get a year or two of C then easily move into C++.

Others may say differently, it depends on when in the inducstry and experience one comes from and where one chooses to go.
 

homercles337

Diamond Member
Dec 29, 2004
6,340
3
71
Originally posted by: scottish144
C++ FTW. C is just C++ without object orientation. Also, if u know C++ u can easily learn Java and C (the syntax is virtually identicle).

Dont forget the STL. It makes any/every job that much easier when handling/moving data. I would start with C++, forget about C if you understand basic syntax.
 

Esbil

Junior Member
Dec 15, 2005
8
0
0
Originally posted by: EagleKeeper
C works for heavy embedded RTOS applications.

C++ is fine to start from as long as you do not choose to go back into C; No habits (bad and good) can cause problems, by forgetting and/or not have the STL & OO available to you in C.

If possible get a year or two of C then easily move into C++.

Others may say differently, it depends on when in the inducstry and experience one comes from and where one chooses to go.

Sorry, RTOS? Most of the examples I receive are in C++ (can't remember the last time I received an SDK that provided C Samples). I have no real desire to learn C for the sake of learning it. I just want to be able to suck as much information as I can out of the C++ based SDKs I'm receiving.


Originally posted by: homercles337Dont forget the STL. It makes any/every job that much easier when handling/moving data. I would start with C++, forget about C if you understand basic syntax.

Sorry, STL?

Thanks,

Esbil

 

mugs

Lifer
Apr 29, 2003
48,920
46
91
Originally posted by: hooflung
Deitel and Deitel books are quite honestly the most horribly written programmings books I have ever laid eyes on. The amount of content covered in each book is too comprehensive to the point of vague on explanation. Its quality vs quantity and they tip the scales of quantity with a chevy 1 ton trucks. They remain the most popular at vocational and community colleges for a reason, lazy teachers.

http://www.amazon.com/gp/product/013142...=283155&tagActionCode=deitelassociatin

The Simply series combines the DEITEL® signature LIVE-CODE Approach with a new APPLICATION-DRIVEN methodology, in which readers build practical, real-world applications that incorporate C++ programming fundamentals.

The buzzwords are hurting my head! I would bypass those books based on the cover alone. I like O'Reilly books myself. Microsoft books are good for MS technologies.

I think there's some value to learning C first. Since the OP already has experience with C#, C++ would not be a huge difference.
 

scottish144

Banned
Jul 20, 2005
835
0
0
Originally posted by: hooflung
Deitel and Deitel books are quite honestly the most horribly written programmings books I have ever laid eyes on. The amount of content covered in each book is too comprehensive to the point of vague on explanation. Its quality vs quantity and they tip the scales of quantity with a chevy 1 ton trucks. They remain the most popular at vocational and community colleges for a reason, lazy teachers.

Uh, depends on what u mean by "vague". While it goes into basic computer theory, it does not discuss much in the way of memory management and the other, more in-depth topics of computer science. However, I recently completed an APCS course, and scored a 5 on the exam partially due to studying from theri books. In addition, their examples are EXTREMELY well commented. This book won't teach you Computer Science, but it does an excellent job of teaching one to program.
 

scottish144

Banned
Jul 20, 2005
835
0
0
Originally posted by: hooflung
Oh and you should be working with C# *gasp never thought I would say that* as it will give you atleast a more pure object oriented approach by default than C++. Developers should never have had to manage memory this long. If you aren't going to be making games or portable software ( blind yourself to the mono project ) then C# is the way to go. Possibly even dip into Delphi for .NET at some point.

If u want a more pure OO programming language, go with Java. It's entire devlopement kit is free, and its multi-paltform. C# is MS's attempt to compete with Java, and while it is capapble, it uses a slightly different syntax that prevents some of teh overlay between languages. Also, C# can only be run on Windows to my knowledge, wheras Java runs on virtually every OS.

In any case, a good IDE is JGRASP (jgrasp.org). Its a free IDE made by the CS department at Auburn Univeristy, and cand Handle C, C++, Java, Ada, and VHDL. It also has a number of advanced features including documentation generation, UML diagram generations, and a JAR file creator for Java.
 

programmer

Senior member
Mar 12, 2003
412
0
0
It's important to learn OOP (Object-Oriented Programming) concepts first. Then apply those concepts in whatever language you choose than can support those concepts. Me, I am a long-time C++ junky and prefer it over Java and C# because it gives me more control (hey, I *want* to manage memory!)

I highly recommend http://www.amazon.com/gp/product/020163.../103-5167296-9963042?v=glance&n=283155

It is a tough read! But read it again and again and it will sink in. It also has some sample code in C++ to apply the concepts.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
RTOS - Real Time Operating System - Embedded applications

SDKs are not usually developed for such systems; These are usually for desktop & larger applications.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I honestly don't see any reason to begin learning vanilla C. C++ is a superset of that language. If you learn C++ you've learned C, as long as you know enough about both to know where the boundaries are.

I will also echo the C# recommendation. If you don't have a need to understand memory management and pointers, and some of the other low level constructs C/C++ offers, then C# will be a much easier road.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Originally posted by: Markbnj
I honestly don't see any reason to begin learning vanilla C. C++ is a superset of that language. If you learn C++ you've learned C, as long as you know enough about both to know where the boundaries are.

I will also echo the C# recommendation. If you don't have a need to understand memory management and pointers, and some of the other low level constructs C/C++ offers, then C# will be a much easier road.


The concern wouild be how will they know what the boundaries are between the two.
Most teaching of C++ within books and TAs do not show such differences.

C++ has been available so long that the educational system(s) seem to ignore/gloss over the differences.

If one is going to stay with the Windows platforms, then learning C# could be an reasonable alternative.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I really meant my "as long as you know where the boundaries are" comment to refer to whether learning C++ also confers knowledge of C. The boundaries are fairly evident, I think, but it's been 20 years since I was a beginner. The real question is: do you need to learn C at all?

I think the answer is a pretty solid no, unless you are doing something specific, like embedded systems or kernel drivers where you absolutely want to be able to control things like structure allignment and function call overhead.

Then there is the question of whether you need to learn C++, and again the answer is probably no for all normal Windows application prorgamming. I love the language, but if the goal is to be able to write Windows apps it is a pretty tough way to get there.
 

hooflung

Golden Member
Dec 31, 2004
1,190
1
0
Well I think the OP needs to think in terms of where he/she thinks they will be in 20 years and how much education will be needed to get there and ALSO what needs to be addressed now.

Being a developer and my product being more or less database driven intranet applications I have to look to see if I am going to benefit myself by learning Objective C becuase I my department might one day rely on Apple Machines ( I am at a University Reserach Unit afterall they aren't uncommon here. )

Now, would I ask myself ( if I didn't know C ) should I learn C before Objective C? I think it is fairly evident that I would need to know C but that many good books, such as O'Reilly, usually make the C to <insert C variant here> connection within the first few chapters. Now, should I choose to learn Obj.C would it benefit my work now which might deal with pearl, php or .Net? Yes. Because Obj.C concepts are pretty good for understanding C variants or imitations and OOP code principles. Would it benefit me to learn C? No. C doesn't do anything that php, perl, vb can't do for all intents and purposes.

This is how I would approach the subject. Then I would make it my goal to steer clear of certain dual author books, having been forced to read them for one reason or another, and go with tried and true O'Reilly. DEITEL books are best left to highschool and community college.
 

Esbil

Junior Member
Dec 15, 2005
8
0
0
Originally posted by: hooflung
Well I think the OP needs to think in terms of where he/she thinks they will be in 20 years and how much education will be needed to get there and ALSO what needs to be addressed now.

Really, it's just a matter of wanting to understand C++ so I can utlitize SDKs as they come through. I just wasn't sure if, by attempting to learn C++ first, I was limiting my potential understanding. I've been doing OOP for a number of years now across a number of platforms but haven't really had a need, until recently, to explore C(++); most of my time has been spent in higher (or lower depending on how you look at it) level languages.

Appreciate all of the advice. I stumbled onto this online C++ tutorial that I've found to be excellent.

Esbil
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
I guess you don't need to know C to do C++. Just like you don't necessarily need to know binary to make a simple program in VB. But it sure is nice as you advance more. C++ is still based off C. You won't be exposed to memory management (at least not as much) in C++ either. The standard C++ classes are training wheels for C functions, essentially. I really recommend you learn them concurrently. cplusplus.com which you linked is where I learned C++.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |