Solved

Create a Class. How? Urgent.

Posted on 2000-03-18
3
218 Views
Last Modified: 2010-04-02
I am using Borland C++ Builder.
I want to create a class, inherited from TRect Class. How do I do it and where do i Save it to use it later.
The class I am trying to create is a rectangle with arrows in it.
0
Comment
Question by:pcb69
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
laeuchli earned 50 total points
ID: 2631498
I assume you are talking about C++. This is easy.
Class Test:TRect
{
public:
private:
protected:
};
0
 
LVL 5

Expert Comment

by:laeuchli
ID: 2631500
just put this in a include file, and and include it with #include"test.h" in your main program.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2631512
If you do that, you probably want to publiclly inherit from TRect.

However, depending on what you _really_ want to do, there is a good chance that you don't really want to enherit from TRect at all.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now