473,508 Members | 2,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inheritance with pointers:Overloading?

my one base class is a linklist class.now i'd like to inherit it by
another class.The problem is that when i use the derived class i can't
access the base class's pointers.classic type mismatch.how do i link
the derived class if i can't compare the derived class's pointers to
the linklist class's pointers?
do i do it with overloading?i tried that,but could get it to work.my
handbooks (all 4 of them) has no example on how to do overloading.can
someone help?e-mail if you want to.please, i'm on a deadline!!!
Jul 22 '05 #1
1 1759
Katie wrote:
my one base class is a linklist class.
You have defined a class called "linklist". OK.
now i'd like to inherit it by
another class.
You want to define another class, derived from "linklist". OK.
The problem is that when i use the derived class i can't
access the base class's pointers.
Now you've lost me. Why not? What pointers? How do you "use"
the derived class?
classic type mismatch.
What?
how do i link the derived class if i can't compare the derived
class's pointers to the linklist class's pointers?
What does it mean to "link" a class?

You _can_ compare a base class pointer and a derived class pointer
for equality. Did you use two equals signs, like `=='?
do i do it with overloading?
I shouldn't think so. Without knowing more about the
problem it's impossible to say for sure.
i tried that,but could get it to work.
Right.
my handbooks (all 4 of them) has no example on how to do overloading.
Borrow or buy a better book. There are reviews on the ACCU site.
More recent reviews are more useful because the way people use C++
has evolved. "The C++ Programming Language", 3rd/Special edition,
by Bjarne Stroustrup, covers the whole language nicely. I don't know
that it's very suitable for a beginner.
can someone help?
I tried, really. I don't understand what you are trying to do.
Can you show us the program you are trying to compile?
e-mail if you want to.
Post here, read here.
please, i'm on a deadline!!!


Good luck with that.

--
Regards,
Buster.
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
4694
by: Terje Slettebø | last post by:
To round off my trilogy of "why"'s about PHP... :) If this subject have been discussed before, I'd appreciate a pointer to it. I again haven't found it in a search of the PHP groups. The PHP...
7
373
by: Katie | last post by:
my one base class is a linklist class.now i'd like to inherit it by another class.The problem is that when i use the derived class i can't access the base class's pointers.classic type mismatch.how...
2
1432
by: Maurice Termeer | last post by:
suppose i've got the following: class a { public: virtual void f(int a); }; class b : public a { public: void f(int a, int b);
12
7013
by: Steve Jorgensen | last post by:
The classing Visual Basic and VBA support for polymorphism, let's face it, is a bit on the weak side, and built-in support for inheritance is non-existent. This little essay is about some patterns...
6
2829
by: Massimo Soricetti | last post by:
Hello, recently I wrote a little class which has to wrap two different type of data, showing the same external interface. I used operator overloading, but the same result I could eventually...
2
7383
by: Tom Smith | last post by:
I'm having difficulty with overloading ==, and it's making my brain melt - can you help...? What I want to have is: 1) A base class A with virtual operator== defined (no problem) 2) A class B...
5
1969
by: toton | last post by:
Hi, I want a few of my class to overload from a base class, where the base class contains common functionality. This is to avoid repetition of code, and may be reducing amount of code in binary,...
3
2130
by: Adam Nielsen | last post by:
Hi everyone, I've run into yet another quirk with templates, which IMHO is a somewhat limiting feature of the language. It seems that if you inherit multiple classes, and those classes have...
3
1608
by: Dan Noland | last post by:
I can work around this easily enough, but can someone help me understand why this works as it does? It seems that functions from a grandparent class are not available as candidates for overload...
0
7127
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7501
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3204
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
424
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.