I also want to use the self defining structure to create a linked list to perform the following functions on the list:
i. Insert data items into the list. Input should be terminated by a zero ii. Delete a specified item from the list iii.Modify a specified item in the list iv. Print the list.
How do i write a self defining data structure for a linked linear list data structure in C language?
I'm not sure what you mean by "self defining data structure"
unless you're pointing out that the "node" of a linked list
contains pointers to it's own type. If it's more than that, then
maybe my answer won't be sufficient; however, I think
what you're asking for is a data structure like:
struct node {
void* data;
struct node* next;
};
If you visit the following web page, you'll find an explanation
of this (and other variations), including source code for
insertion, deletion, search, etc.
http://stsdas.stsci.edu/bps/linked_list....
Reply:Sounds to me like you want to do a template class, so that you can define which data type to store in your linked list "on the fly". Here's a tutorial about templates:
http://www.devarticles.com/c/a/Cplusplus...
Oh, it is in C++. But I thought maybe that's what you meant, because I wouldn't know what "self-defining data structure" is otherwise.
Reply:Seems like you are making a database software. Like a library or dictionary program. Most likely you will need iostream.h and stdio.h as header then use multidimensional arrays to store the result. as for printing use printf or if you save the data on a file
fprintf.
But if I tell you more you will have to pay/employ me :).
An advice: Think on the data structures before you create the program.
Thursday, July 9, 2009
Can I back on the eligible blood donation list after a false positive test for Hepatitis C?
A year ago, I donated blood and it came back positive for Hepatitis C. Since then I have had 2 separate test for Hepatitis C, (1 month after the false positive, and 1 year after the false positive), and both came up negative. I don't even show up as ever having antibodies for Hepatitis C, so my doctor told me the results show that I have never had Hepatitis C. Is it possible to ever get back on whatever list they use so I am eligible to donate blood again, or am I banned forever.
Can I back on the eligible blood donation list after a false positive test for Hepatitis C?
I sell my plasma and i'm pretty sure it's the same list, she told me that if I had a false positive I would not be able to donate blood or plasma ever again. once on it your on it forever from the way it sounds.
Reply:If you took a test a year later from when you got your first positive and it came back negative, then you should be eligible to donate blood again. Its possible, but rare that the test came up with a false positive. The only thing that may be required for you to get back on the list is to have the first test that came up positive and the test you took a year later that came up negative; providing these documents will prove that you are clean and you should have no problem getting back on the list. Good luck to you.
Can I back on the eligible blood donation list after a false positive test for Hepatitis C?
I sell my plasma and i'm pretty sure it's the same list, she told me that if I had a false positive I would not be able to donate blood or plasma ever again. once on it your on it forever from the way it sounds.
Reply:If you took a test a year later from when you got your first positive and it came back negative, then you should be eligible to donate blood again. Its possible, but rare that the test came up with a false positive. The only thing that may be required for you to get back on the list is to have the first test that came up positive and the test you took a year later that came up negative; providing these documents will prove that you are clean and you should have no problem getting back on the list. Good luck to you.
What is the source code to sort a linked list in C? Strings are what to be sorted.?
It's a linked list of structures with strings. The whole program is like a directory. The string is the name. We must sort it out alphabetically as we enter the data. Kind of frustrating that I have to do ask this.
What is the source code to sort a linked list in C? Strings are what to be sorted.?
Instead of sorting the list after entering the node, you must sort it while inserting the node. Whenever you add a new node compare it with all the nodes already present in the linked list and insert it accordingly. The "head" pointer points to the first node and the successive "next" pointers point to the nodes that are (alphabetically) smaller than the current node.
This is just kind of a rough algorithm. Try to code it, hope you got it.
Reply:When creating linked lists I make sure a prototypical comparison method exists. This method is generally customized for each type making use of the template.
Like strcmp() the method is intended to return less than zero if the left operand is less than the right, zero if equal, and greater than zero if the left operand is greater than the right.
Two sorting methods are provided (as overloads of each other.) One is the general sort which will do the basic ascending or descending values of the list. The other accepts a function pointer that allows for a custom sorting algorithm.
An example of a custom sorting algorithm is a randomizer; it simply returns one of the three expected returns at random. :-)
Reply:That is not easy. May be you can contact a C expert at websites like http://askexpert.info/
violet
What is the source code to sort a linked list in C? Strings are what to be sorted.?
Instead of sorting the list after entering the node, you must sort it while inserting the node. Whenever you add a new node compare it with all the nodes already present in the linked list and insert it accordingly. The "head" pointer points to the first node and the successive "next" pointers point to the nodes that are (alphabetically) smaller than the current node.
This is just kind of a rough algorithm. Try to code it, hope you got it.
Reply:When creating linked lists I make sure a prototypical comparison method exists. This method is generally customized for each type making use of the template.
Like strcmp() the method is intended to return less than zero if the left operand is less than the right, zero if equal, and greater than zero if the left operand is greater than the right.
Two sorting methods are provided (as overloads of each other.) One is the general sort which will do the basic ascending or descending values of the list. The other accepts a function pointer that allows for a custom sorting algorithm.
An example of a custom sorting algorithm is a randomizer; it simply returns one of the three expected returns at random. :-)
Reply:That is not easy. May be you can contact a C expert at websites like http://askexpert.info/
violet
Is defragmentation good for my C drive? Plese list the good and bad side about it.?
My computer in total has 15.0 gigabytes and the space used is 14.5 gigabytes. I only have 485 megabytes left. I need to know if defragmenting my C drive is a good idea.
Is defragmentation good for my C drive? Plese list the good and bad side about it.?
Defragmentation is when the utility reorganizes your data on the hard drive (physically moving it to another place). This lets your computer find the stuff faster.
You probably won't be able to get a good quality defrag without 10% to 15% free space (you only have 3% free space).
You should run the "Disk Cleanup" utility first, then see how much free space you have.
Reply:not much down's really, just moves files around for faster performance and better organized, i would recommend getting a new hard drive that will work with ur computer cause 15gb, not much and since u only have 485mb lest, wow. defragment need at least 15% of ur hard drive of free and usable to work properly
Reply:Regular de-fragmentation will prolong the life of your hard drive because the heads do not have to seek so much. Also it will improve overall speed.
Downside - if your computer crashes or you get a power cut during de-fragmentation it is slightly possible that a file may get corrupted.
You do not have 15% free space so you are unlikely to be able to do a de-fragmentation
wdw
Reply:It is absolutely good. Bad side is that if you have a virus on your computer, it will spread it around like crazy. It happened to me long time ago, when I was a kid. I did have to hear a lot of yelling from my brother. Let that be lesson to all of you :):)
Hope answers your question.
Kind Regards,
Is defragmentation good for my C drive? Plese list the good and bad side about it.?
Defragmentation is when the utility reorganizes your data on the hard drive (physically moving it to another place). This lets your computer find the stuff faster.
You probably won't be able to get a good quality defrag without 10% to 15% free space (you only have 3% free space).
You should run the "Disk Cleanup" utility first, then see how much free space you have.
Reply:not much down's really, just moves files around for faster performance and better organized, i would recommend getting a new hard drive that will work with ur computer cause 15gb, not much and since u only have 485mb lest, wow. defragment need at least 15% of ur hard drive of free and usable to work properly
Reply:Regular de-fragmentation will prolong the life of your hard drive because the heads do not have to seek so much. Also it will improve overall speed.
Downside - if your computer crashes or you get a power cut during de-fragmentation it is slightly possible that a file may get corrupted.
You do not have 15% free space so you are unlikely to be able to do a de-fragmentation
wdw
Reply:It is absolutely good. Bad side is that if you have a virus on your computer, it will spread it around like crazy. It happened to me long time ago, when I was a kid. I did have to hear a lot of yelling from my brother. Let that be lesson to all of you :):)
Hope answers your question.
Kind Regards,
How to you add a tooltip to a List View Column header in c#?
In regards the C# programming, i am having trouble adding a tooltip to the columnheader for a list view for there does not seem to be a mouse event for it, any ideas?
How to you add a tooltip to a List View Column header in c#?
It should be as easy as dropping the tool tip on your form... then going back to your list view and there should be a new property entry for your tool tip...
How to you add a tooltip to a List View Column header in c#?
It should be as easy as dropping the tool tip on your form... then going back to your list view and there should be a new property entry for your tool tip...
How doiwrite a C++ program that reads in a list of prices, program should output theaverageprice andtotalprice
How do I write a C++ program that reads in a list of prices, And the program should output the average price and total price. The price should be properly formatted with a $ and only 2 points past the decimal.
How doiwrite a C++ program that reads in a list of prices, program should output theaverageprice andtotalprice
Show us what you've done so far.
How did you do the input?
How did you store the data internally?
How did you do the calculations?
How did you do the output?
If you haven't even started, you need your own teacher, not us.
Reply:its easy
assign a array and take prices of diffrnt things
add them its total
count no of items
find average
for formatting use ctype.h header with setwidth and setprecision functions
How doiwrite a C++ program that reads in a list of prices, program should output theaverageprice andtotalprice
Show us what you've done so far.
How did you do the input?
How did you store the data internally?
How did you do the calculations?
How did you do the output?
If you haven't even started, you need your own teacher, not us.
Reply:its easy
assign a array and take prices of diffrnt things
add them its total
count no of items
find average
for formatting use ctype.h header with setwidth and setprecision functions
How i can write a complete program in c++ to implement the link list operations as following?
How i can write a complete program in c++ to implement the link list operations as following?
a. Write a routine to make two lists L1 and L2 with 5 elements given by the user at run time. Or add two lists with its elements in the main function.
b.Write a routine to compute L1 ∩ L2 using only the basic list operations.
c. Print out L1, L2, and L1 ∩ L2.
For example if you have
L1 = {1, 3, 4, 6, 7}
L2 = {2, 5, 6, 7, 8}
So the
L1 ∩ L2 = {6, 7}
How i can write a complete program in c++ to implement the link list operations as following?
1. Write two Lists that each supports one integer..
2. Compare element #1 in L1 with whole elements in L2,
Compare element #2 in L1 with whole elements in L3, and so on..
3. build a new list (lets say L3) which supports one integer that save everytime you find same integer in comparation (2)
eg :
for(headL1, tailL1, next)
{
int a = currL1;
for(headL2, tailL2, next)
{
int b = currL2;
if (a == b) push to L3;
}
}
HTH,
niccie_11
peony
a. Write a routine to make two lists L1 and L2 with 5 elements given by the user at run time. Or add two lists with its elements in the main function.
b.Write a routine to compute L1 ∩ L2 using only the basic list operations.
c. Print out L1, L2, and L1 ∩ L2.
For example if you have
L1 = {1, 3, 4, 6, 7}
L2 = {2, 5, 6, 7, 8}
So the
L1 ∩ L2 = {6, 7}
How i can write a complete program in c++ to implement the link list operations as following?
1. Write two Lists that each supports one integer..
2. Compare element #1 in L1 with whole elements in L2,
Compare element #2 in L1 with whole elements in L3, and so on..
3. build a new list (lets say L3) which supports one integer that save everytime you find same integer in comparation (2)
eg :
for(headL1, tailL1, next)
{
int a = currL1;
for(headL2, tailL2, next)
{
int b = currL2;
if (a == b) push to L3;
}
}
HTH,
niccie_11
peony
Subscribe to:
Posts (Atom)