Hi All,
This is my first to this group. I have a linklist implementation. I
want to put some checks in the implementation code
so that i can detect any problem with the list and capture some data
to prove the problem.
Any suggestion or code fragments are welcome .
Thanks,
Adil 3 1345 ad*******@gmail .com wrote:
This is my first to this group.
Have you read the FAQ yet?
I have a linklist implementation.
I guess you're asking us to take your word for it. OK.
I
want to put some checks in the implementation code
so that i can detect any problem with the list and capture some data
to prove the problem.
What would you consider a "problem with the list"?
Any suggestion or code fragments are welcome .
Yes. Please post some code fragments so we could actually make some
suggestions.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
On Jul 31, 6:03 pm, "Victor Bazarov" <v.Abaza...@com Acast.netwrote:
adil.m...@gmail .com wrote:
This is my first to this group.
Have you read the FAQ yet?
I have a linklist implementation.
I guess you're asking us to take your word for it. OK.
I
want to put some checks in the implementation code
so that i can detect any problem with the list and capture some data
to prove the problem.
What would you consider a "problem with the list"?
Any suggestion or code fragments are welcome .
Yes. Please post some code fragments so we could actually make some
suggestions.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Basically, I want to inroduce some sanity checks in
implementation. ...
I would like to know if I can do that. Also if it is a standard
practice.
Example of these consistency or sanity checks would be
, after adding or deleting a node If I can somehow find that the list
has been corrupted or not.
In case the list got corrupted I would like to capture some
information
regarding the nodes involved in the list corruption.
By corruption I mean if the list got broken or anything bad.
The implementation is based on a fast fail strategy. I would like to
fail in the
implementation as soon as some sanity check failed rather than
continue and corrupt
other data structures if anything goes bad with the list.
On Jul 31, 11:40 pm, adil.m...@gmail .com wrote:
Hi All,
This is my first to this group. I have a linklist implementation. I
want to put some checks in the implementation code
so that i can detect any problem with the list and capture some data
to prove the problem.
Any suggestion or code fragments are welcome .
As others have mentioned it's difficult to give examples without
anything from you to go on, but a try:
LinkedList::cle ar()
{
// some of your code that clears the list
....
// the end of your code
// Then add something like this:
assert(size() == 0);
} This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: yee young han |
last post by:
I need a fast data structure and algorithm like below condition.
(1) this data structure contain only 10,000 data entry.
(2) data structure's one entry is like below
typedef struct _DataEntry_
{
char szInput;
char szOutput;
int iSum;
|
by: Da-Breegster |
last post by:
Hi. I'm attempting to write a roguelike (think nethack, crawl, angband,
tome, adom, and yes, I suppose even rogue) in Perl and I've ran into a
problem regarding the data structure for the map and handling it easily.
A map is one 2D level, a simple grid. Each tile on the grid will be a
hash of data about the grid. The map object itself has other bits of
data, so that's why I don't just make the object an anonymous array:
$map->{Map} = {...
|
by: Thomas Paul Diffenbach |
last post by:
Can anyone point me to an open source library of /statically
allocated/ data structures?
I'm writing some code that would benefit from trees, preferably self
balancing, but on an embedded system that doesn't offer dynamic
memory allocation (to be clear: no malloc, no realloc), and with
rather tight memory constraints.
Writing my own malloc to do dynamic allocation from some static pool
isn't really an option, for various reasons, not...
|
by: theshowmecanuck |
last post by:
As a matter of academic interest only, is there a way to programmatically
list the 'c' data types? I am not looking for detail, just if it is
possible, and what function could be used to accomplish it. For example:
int main void()
{
while there are more data types
{
print next data type;
}
|
by: Bart Goeman |
last post by:
Hi,
I have a question about how to put redundant information in data
structures, initialized at compile time. This is often necessary
for performance reasons and can't be done at run time (data
structures are read only)
Ideally one should be able to put the redundant
information there automatically so no mistakes are possible, but in a lot
of case I see no way how to do it.
| |
by: Alfonso Morra |
last post by:
Hi,
I am writing a messaging library which will allow me to send a generic
message structure with custom "payloads".
In many cases, a message must store a non-linear data structure (i.e.
"payload") using pointers. Examples of these are binary trees, hash
tables etc. Thus, the message itself contains only a pointer to the
actual data. When the message is sent to the same processor, these
pointers point to the original locations, which...
|
by: saleem |
last post by:
Dear friends,
I am working on the problem which deals with the data management
of requests and how should we match the responses for the requests to
compare the correct Response.
my problem is like this, say I am intermediary node between "m"
and "n" nodes . n nodes send any of the "p"type of requests to any one
of the "m" nodes on the other side. I have to forward the requests to
|
by: vinayak |
last post by:
Hi
I am displaying data in Datagrid in ASP.NET with
Edit/Update functionality for each row. On the same page I
have 2 Button controls which submits the request to
server. These button controls are Web Control & not HTML
control. One of these buttons whose title is Delete is
added on the aspx page in design view & also I double
clicked on this button in design view to get the onclick
code for this button in the code behind page. & for...
|
by: zoltan |
last post by:
Hi,
The scenario is like this :
struct ns_rr {
const u_char* rdata;
};
The rdata field contains some fields such as :
|
by: Charles Law |
last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this
once before, but ...".
Two users are both looking at the same data, from a database. One user
changes the data and commits it. How does the other user get the updated
view without polling for changes? Is there some sort of callback mechanism
that can be set up on the dataset or connection?
TIA
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |