2
votes
Global Variable vs Local variables?
candidate_count is not declared in main. It's a global variable (declared outside of main) on line 20 in the distribution file plurality.c at the time of this writing. The definition of main starts ...
1
vote
Accepted
pset5 speller Hash table not appearing in the debug50 stack/heap
Look very carefully at all of the areas on the right side of the screen. Did you notice that the area that shows the vars and their content is called local variables?
It isn't that the vars you ...
1
vote
Accepted
Pset5 with linked list: head node creation
An empty linked list consists only of a NULL pointer, no node. There is no dedicated "head" node, just a "head" pointer pointing to the first node (and if there's none, it's NULL). So you could just ...
1
vote
Accepted
pointer for function using global variable
Interesting question. The answer is that a global variable does not work in your program.
The compiler warning is really telling you that the variable a, in main, is different from the variable a in ...
Only top scored, non community-wiki answers of a minimum length are eligible