Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

// applicable template code // FILE: main.cpp Solution new->next =&word; What is

ID: 3633558 • Letter: #

Question

// applicable template code

// FILE: main.cpp

Explanation / Answer

new->next =&word; What is the datatype of new->next? How about word? Why would you try to assign the type of word to the type of new->next? You appear to be engaged in mega-copy/paste programming. Not a great tactic. It's suppose to be a pointer, one of my TA's told me to do it like this. I'm confused about what is going on there, but I'm also trying to figure out how to do this correctly. My problem is both with syntax and comprehension. ===================================================================== also check this..... #include #include #include #include #include int size = 0; const int sizeofarray = 5000; using namespace std; double calculate(const rusage *b, const rusage *a); int check(); struct node { char word[50]; node * nextnode; }; node* dict[sizeofarray]; int hash(node*); void unload(node*); int main() { rusage before, after; char temp[50]; char tempchar; int a; int b; ifstream dictionary("~/Desktop/words"); for(int s=0; snextnode==NULL; strcpy(tempnode->word, temp); b=hash(tempnode); if(dict[b]==NULL) dict[b]=tempnode; else { tempnode->nextnode=dict[b]; dict[b]=tempnode; } break; } } } getrusage(RUSAGE_SELF, &after); cout