Questions tagged [node]
The node tag has no usage guidance.
13
questions
0
votes
1
answer
376
views
Pset 5 Speller Linked List Nodes
I thought I got pointers but I don't fully understand a function that gets a new node for a linked list. I understand the theory behind Hash tables and chaining with linked lists but when it comes to ...
0
votes
1
answer
141
views
Pset5 with linked list: head node creation
I am having some headaches about pset5.
Before tackling hashtables and tries, I have been trying to solve the problem with a single linked list to make it simpler. To do this I have defined a couple ...
0
votes
1
answer
44
views
sizeof() syntax error with node pointer
Is there something wrong with my syntax? Won't compile, apparently because of line:
sizeof(node->sprouts) / sizeof(node)
above node defined as follows:
typedef struct node
{
bool is_word;
struct ...
0
votes
1
answer
76
views
SPELLER-Create Global struct definition and global struct instance
I am working on SPELLER and am stuck on the load function. I have no errors the way it's written but the problem is in this code's location.
typedef struct node
{
...
0
votes
1
answer
3k
views
incompatible integer to pointer conversion returning 'int' from a function with result type 'struct node *' with custom create_node function
Clang returns an incompatible integer to pointer conversion returning 'int' from a function with result type 'struct node *' error when my create_node function checks whether the ptr malloc returns ...
0
votes
1
answer
20
views
what is a node and what is an element in HTML?
Silly question i know, but i'm trying to understand the basics of HTML reference words so that I know what people are talking about. Please help!
1) My question is, what is a node and what is an ...
0
votes
2
answers
2k
views
Pset5 incomplete definition of type struct node
EDIT:
I've changed my struct to match what's in the video as thus in my header file:
typedef struct{
bool end;
struct node* child[27];
}node;
And in my C file when I do:
if(trav->child[...
0
votes
1
answer
79
views
pset5 root node not freed
It looks like my unload function is not working properly. Valgrind shows 0 errors, but when I print out the address of my root node, it is not NULL. Hence my unload function (which returns true if ...
1
vote
1
answer
601
views
pset5 root node defitnion (trie)
I'm trying to figure out where/how to define the root node of my trie in dictionary.c. I have declared my struct node as follows:
typedef struct node
{
bool is_word;
struct node* children[27]...
1
vote
1
answer
324
views
How to add a new node in the linked list
Now that I am done with pset5 I would like to understand how to add a new node to a linked list. While building the pset, I blindly used Zamyla's guidelines on how to add a new node to a linked list ...
5
votes
1
answer
981
views
Pset5: Misunderstanding tries and method to assign letter to an array inside a struct
Before posting, I've searched a lot here and there on the Internet to find the answers to my questions myself and I did code something that eventually works.
My issue is that I've re-rewrote some ...
1
vote
1
answer
2k
views
Dynamic string length allocation in new_node->word; array type char [46] is not assignable
I am trying to make my node size dynamically change with the size of the word from the dictionary in the load(dictionary) function.
I understand that the warning means I am trying to assign a pointer ...
0
votes
1
answer
162
views
Check Value at Children[i] in Trie
In the tutorial video Zamyla states to "check the value at children[i]"
Which will return NULL or not NULL.
What does check the value mean?
Cheers
Adam