Skip to main content

Questions tagged [global]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

pset5 speller Hash table not appearing in the debug50 stack/heap

This question is related with this other question of mine, in which I am trying to complete pset5: speller. I took Cliff's advice, and additionally executed the debug50 on my code. Since the original ...
nico_so's user avatar
1 vote
1 answer

Global Variable vs Local variables?

I'm trying to write a function that will be called in main(int argc, string argv[]) for pset 2: plurality. Inside the function, I want a for loop. I've written this: bool vote(string name) { ...
DanielDances's user avatar
0 votes
1 answer

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 ...
Mattiun's user avatar
0 votes
1 answer

Global Pointer Value Changing to 0x0

So I'm doing pset5, speller. I'm storing the words in the dictionary in a trie, whose root is a pointer to a node, called root. root is a global variable first initialized to NULL. root is first used ...
SMT's user avatar
  • 3
0 votes
1 answer

PSET5 speller, what am I doing wrong passing my dictionary to check?

I have been spending loads of time staring at my code for loading a dictionary and checking for misspelled words. Te programme keeps telling me that all words are misspelled which leads me to believe ...
Gary's user avatar
  • 3
0 votes
1 answer

pointer for function using global variable

I understand why passing value in a function does not work as main function will not have access to changed value (change takes place in the stack frame of called function However if I declare ...
rasdocus's user avatar
0 votes
1 answer

where to initialize the variable that keeps track of the blank space

I am working on "Move" of exercise Fifteen in PSET3 of CS50. I am unsure about how to keep track of the blank space. I have tried to add the row and column number of the initial blank space as a ...
Maple's user avatar
  • 1