473,414 Members | 1,636 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

How to update typeset on classes

I'm making a basic classes.
(snipped for simplicity)
class CWLRecord //Base Record Class
{
private:
CWLRecord *pNextRecord ; //Pointer to next record
} ;

then I take this base record class and define a record for each
different set of data I have. However, I want to make sure that when I
create an instance of the derived class CWLRecord_Foo, instead of
pNextRecord being a pointer of type CWLRecord, I want it class
CWLRecord_Foo to require a pointer of type CWLRecord_Foo. However, I
want to still be able to use functions from CWLRecord (such as WipeAll,
RetrieveNext, etc) to be able to use pNextRecord as a generic
CWLRecord. Can I do

class CWLRecord_Foo : public CWLRecord
{
private:
CWLRecord_Foo *pNextRecord
};

and have it work in the way I'd like it to? I just want to make sure
I'm not doing something fundamentally wrong.

Thanks,
Josh McFarlane

Jul 23 '05 #1
1 1946
> However, I want to make sure that when I
create an instance of the derived class CWLRecord_Foo, instead of
pNextRecord being a pointer of type CWLRecord, I want it class
CWLRecord_Foo to require a pointer of type CWLRecord_Foo. However, I
want to still be able to use functions from CWLRecord (such as WipeAll,
RetrieveNext, etc) to be able to use pNextRecord as a generic
CWLRecord.


Ok, that sounds confusing so let me simplify it.

CWLRecord is a base link-list class. I want to retain next node pointer
from the base class but when declaring an instance of a certain
recordset (CWLRecord_Foo), I want the pointer to the next Linklist item
to be restricted to those of type CWLRecord_Foo, but still able to use
functions from the base.

Jul 23 '05 #2

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

Similar topics

5
by: jn | last post by:
I have a page that shows info from MySQL. It is for an online education site. It uses different classes arranged in a hierarchy. Each lesson is roughly laid out like this: Lesson |-Intro |...
3
by: chrisspen | last post by:
Is there a way to loop through all instantiated objects and update their classes when a source file changes? I know about Michael Hudson's method...
4
by: Jim Hammond | last post by:
It would be udeful to be able to get the current on-screen values from a FormView that is databound to an ObjectDataSource by using a callback instead of a postback. For example: public void...
1
by: chris | last post by:
I am new to web services but want to know if it would be a viable solution for a project we are considering. I have a site in the US that i want to use a webservice to pull data out off SQL Server...
30
by: Bruce Momjian | last post by:
I have events in the next few weeks in New York City, Copenhagen, Paris, and Atlanta. Check the News section on the web site for more information. I will also be in Amsterdam February 2-3, though...
8
by: Vivek | last post by:
Hi, I wish to update the LIST<T> created in PARENT FORM from the CHILD FORM. Currently I have declared the LIST<Role> as public in my parent form. What can I do to update the <LIST>? Thanks
5
by: Dave Smithz | last post by:
Hi there, Been working on an evolving DB program for a while now. Suddenly I have come across a situation where I need to update a table based on a group by query. For example, I have a table...
6
by: Dixie | last post by:
I have asked this question before, but I could not get the suggested solution work. So I will give more details this time. I have an append query that adds several hundred records to a table...
6
by: | last post by:
Hi, I'm steel trying to read and update my XML file with Visual Basic Express but i am unable to find the right way to read my xml file and update it if neccessary... Here is my problem :...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.