C Programming Tutorials and advice
CProgrammingTrends News Archives About Us Feedback

Recent Articles

C++ Creator Speaks At Stevens
Within their fields, at least, the creators of different things often achieve rock-star status. A Ford Mustang with a plaque signed by Carroll Shelby will, for example, sell for thousands of dollars more than an...

C#, C++ Among Microsoft's Favorite Languages
To say that Microsoft's important would be to make a huge understatement; the tech company has a market cap of about $264 billion, and its influence can...

Using C Programming To Simplify JavaScripting...
A few days ago, Google released their Closure Compiler project for optimizing JavaScript. Here's what they write about the Closure Compiler: The Closure Compiler...

How To Use C Programming To Verify Your Javascript
In the past few days, I've worked on finding a way to do static code analysis on JavaScript files.The resaon is that I want to apply some sort of binary and source...


01.07.10



In C++, We Don't Write Our Bugs, We Inherit Them

By Rodney Sellers

Inheritance is one of the concepts on C++ that is difficult to understand and frustrating to track down bugs. Inheritance is when you create a new derived class from a base class.

An example would be if you had a base class of employee, it could have basic elements such as pay, schedule, and name. Then, you could have a derived class of manager. It would have all the elements of employee, but could have its own elements such as location, projects, and group.

I remember in college some of my professors would have us break up into teams, and each team would make part of a program and inherit something from the team. Tracking down some of the bugs took hours, if not days. If the team next to you didn't do their part, you were left all alone. You had to try to track down the bug and prove that it wasn't your code that was causing the issue. Doing this required long meetings with the professor and the other groups. Ironically, I found this to be very useful when I started working as a coder.


How do you handle issues of inheritance? Do you work around them? Do you bring them up to the person who wrote the base class you are using? Do you have access to change the base class yourself? Do you have the time to change the bass class yourself? These are all important questions when you are trying to tackle this issue. I have done each in my time as a coder, and all require significant work on your part.

In conclusion, always test your code and make sure it isn't the problem. Also, make sure you are using the class correctly. If you have tested your code and it is working correctly, then you will be fighting an uphill battle to get it corrected.

About the Author:
Rodney Is A Staff Writter for iEntry.
About CProgrammingTrends
A collection of articles and tutorials designed to help C and C variant programmers in their programming work. C Programming Tutorials and advice





CProgrammingTrends is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com ITmanagmentNews.com





-- CProgrammingTrends is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2010 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal


archives | advertising info | news headlines | free newsletters | comments/feedback | submit article


CProgrammingTrends Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact