Object-Oriented Programming in C++ (4th Edition) by Robert Lafore

In summary: You can start by learning the basics - state and flow-control - and then move on to the more advanced concepts. There is no shame in that. And I think you'll be glad you did.In summary, this book is a good introduction to Object-Oriented Programming, but it is geared towards C++ programmers and may not be as useful for newbies.
  • #1
PainterGuy
940
69
hello every1,

i was able to find this book "Object-Oriented Programming in C++ (4th Edition) by Robert Lafore" in a local library. I am thinking of self-learning c++.. do u have any information on this text...is it easy...im totally blank in this area of programming and computers in general... any information is welcome. thanx
 
Technology news on Phys.org
  • #2
I've never seen this book myself, but the are mostly favorable.

Some reviewers note that this book is oriented towards Windows-specific compilers so you may need to make some adjustments if you're using a more generic compiler such as g++ on a Unix or Linux system.
 
Last edited by a moderator:
  • #3
a bundle of thanx, jtbell.
 
  • #4
Geez this makes me sad. This book is 1040 pages of introductory C++ for about $43 CAD, where as my first semester C++ textbook is 928 pages, of introductory and intermediate C++ for about $145 CAD.
 
  • #5
It a really great book! hf :P
 
  • #6
Hello ever 1
I have the same book .. and is quit interesting . I personally have learned c and have so basic knowledge about programming with C. But I have this constant fare of don't being able to do it.. can please come 1 guide me how can i get this fare out of my mind??/
thank you in advance
 
  • #7
The way to get over your fear of not being able to do something is to practice doing what you are afraid of. Do you have any questions about the examples or problems that are given in this book?
 
  • #8
You need to practice more to overcome that fear. Try to assign a task for yourself or take up exercise questions from other C++ programming books and try to solve them.
 
  • #9
I have referred to many books eg: detel detel, pohl etc. but I find Lafore the best. The best topic was the example of how a programmer and customer interact and develop software. T
 
  • #10
Hi everyone,:smile:

I also have the same book. Sorry this is not the best. In every section the author assumes the reader knows about C programing and programming in general. May be it is good book for a programmer who wants to review the material but not for the newbie like me.

Cheers
 
  • #11
PainterGuy said:
hello every1,

i was able to find this book "Object-Oriented Programming in C++ (4th Edition) by Robert Lafore" in a local library. I am thinking of self-learning c++.. do u have any information on this text...is it easy...im totally blank in this area of programming and computers in general... any information is welcome. thanx

oh this book is used as a course book for mechanical engineering department in ciit,sahiwal,pakistan. i am a student of mecahnical engineering so i recommend you to read this book happily and enjoy the world of c++.
 
  • #12
KrisOhn said:
Geez this makes me sad. This book is 1040 pages of introductory C++ for about $43 CAD, where as my first semester C++ textbook is 928 pages, of introductory and intermediate C++ for about $145 CAD.

don,t worry all the pages are only interpretations but if you are able to learn the fundamentals than pages are no problem
 
  • #13
PainterGuy said:
Hi everyone,:smile:

I also have the same book. Sorry this is not the best. In every section the author assumes the reader knows about C programing and programming in general. May be it is good book for a programmer who wants to review the material but not for the newbie like me.

Cheers

Hey PainterGuy.

It's actually probably a good idea that you learn the ideas of C before you learn the C++ specific concepts.

I'll give you some reasons why.

The first thing you have to understand is that the basic computing architecture is a procedural one. You put commands in memory (and data but let's not focus on that just yet) and you start somewhere and execute your code from the top down.

Now of course when you're doing this your pointer to the instruction can go back when you have things like loops or can jump when you call a function or maybe if you're using threads of writing interrupt code your code will just jump to another place and then return back where it was later on.

So when you're learning to code you need to get skills in two areas: state and flow-control. These are the two most important things. You will write code and it will go wrong. In order to understand where it wrong and to not create those kind of problems again, you will need to debug your code and that means stepping through the code, and looking at the state of your data in memory.

Once you have learned the state and flow-control in C, you then see what's changed when you move to C++ with things like classes and constructors and destructors and so on. Then if you haven't used threads in C, you will focus again on what happens with state and flow-control when you introduce threads.

I will tell you know that if you can not get the flow control right in something like C, you won't get it right in C++.
 
  • #14
chiro said:
Hey PainterGuy.

It's actually probably a good idea that you learn the ideas of C before you learn the C++ specific concepts.

I'll give you some reasons why.

The first thing you have to understand is that the basic computing architecture is a procedural one. You put commands in memory (and data but let's not focus on that just yet) and you start somewhere and execute your code from the top down.

Now of course when you're doing this your pointer to the instruction can go back when you have things like loops or can jump when you call a function or maybe if you're using threads of writing interrupt code your code will just jump to another place and then return back where it was later on.

So when you're learning to code you need to get skills in two areas: state and flow-control. These are the two most important things. You will write code and it will go wrong. In order to understand where it wrong and to not create those kind of problems again, you will need to debug your code and that means stepping through the code, and looking at the state of your data in memory.

Once you have learned the state and flow-control in C, you then see what's changed when you move to C++ with things like classes and constructors and destructors and so on. Then if you haven't used threads in C, you will focus again on what happens with state and flow-control when you introduce threads.

I will tell you know that if you can not get the flow control right in something like C, you won't get it right in C++.

Hi chiro,

Many thanks for your advice. Now I will stick to this book by Lafore because it also introduces some C concepts. You have always been helpful to me. Thanks for this.

Cheers
 

1. What is object-oriented programming (OOP)?

Object-oriented programming is a programming paradigm that is based on the concept of objects, which contain data and code to manipulate that data. It focuses on creating reusable code by organizing data and functions into objects, making it easier to maintain and modify code.

2. What are the main features of OOP in C++?

The main features of OOP in C++ include encapsulation, inheritance, and polymorphism. Encapsulation allows data to be hidden and only accessible through specific functions, inheritance allows for code reuse by creating new classes based on existing ones, and polymorphism allows objects of different types to be treated in a similar way.

3. How do I declare a class in C++?

To declare a class in C++, you use the class keyword followed by the name of the class. Inside the curly braces, you can define the data members and member functions of the class. For example: class Car { private: int year; string make; string model; public: void drive(); }

4. What is the difference between a class and an object?

A class is a blueprint or template for creating objects, while an object is an instance of a class. In other words, a class defines the characteristics and behaviors of objects, and objects are specific instances of those characteristics and behaviors in action.

5. How do I create an object in C++?

To create an object in C++, you use the new keyword followed by the name of the class and parentheses. For example: Car myCar = new Car(); This will create a new instance of the Car class and assign it to the variable myCar.

Similar threads

  • Programming and Computer Science
Replies
7
Views
423
  • Programming and Computer Science
2
Replies
65
Views
2K
  • Programming and Computer Science
Replies
29
Views
5K
  • Programming and Computer Science
Replies
3
Views
3K
Replies
13
Views
2K
  • Programming and Computer Science
Replies
26
Views
4K
  • Science and Math Textbooks
Replies
7
Views
8K
  • Programming and Computer Science
Replies
2
Views
2K
  • STEM Career Guidance
Replies
16
Views
3K
  • Programming and Computer Science
Replies
1
Views
1K
Back
Top