typedef struct household {
char race[20];
char region[20];
char town[20];
int familySize;
int fullyVaccinated;
int testedPositive;
}Household;
typedef struct pair_ {
int count;
char town[20];
}LocationCountPair;
typedef struct temp_ {
Household data;
struct temp_ * next;
}Node, *NodePtr;
So above is the structure of my linked list, I have written my own code of creating a linked list, but somehow I am getting an error at runtime when I allocate memory via malloc(), if you know how to just create a method which will create 100 nodes randomly. The project is all yours.
Hello, I will do simplest coding in C++, C using OOP, data structures concepts. If it is an assignment then coding will be easily understandable for u. I have done many C/C++ works here. Lets have a chat for further details and budget. Thanks.
I can help you in finding the error and creating dynamic array of size of 100. I have over 4+ years of experience in C/C++, Data Structure, and algorithms.
Hellow. I have sach code which can help you allocate memory for your implementeation.
Just need to change Node struct to your and initialize your values...
If you have questions ask me))
// some linked list
#include <stdio.h>
#include <stdlib.h>
struct Node {
int data;
struct Node* next;
};
int main()
{
struct Node* head = NULL;
struct Node* second = NULL;
struct Node* third = NULL;
head = (struct Node*)malloc(sizeof(struct Node));
second = (struct Node*)malloc(sizeof(struct Node));
third = (struct Node*)malloc(sizeof(struct Node));
head->data = 1; // assign data in first node
head->next = second; // Link first node with
second->data = 2;
second->next = third;
third->data = 3;
third->next = NULL;
return 0;
}
hey dear, its a piece of cake for me. I can complete it easily. I have made several assignments regarding linked lists in c and C++. Do contact me if interested.
Do you have some time to give me a brief details and about the initial requirement ? I think I can help you in this regard. First I have to fulfill your initial demand.