1

You don't need to allocate memory to go checking through a node in your check function. You only need a pointer. Let's go through your 'check' function: *cursor = malloc(sizeof(node)); Here you're doing two things: you're allocating memory of the size of a node and creating a pointer 'cursor' pointing to that memory. cursor = table[alpha]; Here you make ...


1

Each dict in portfolio contains 3 keys as returned from the execute. There is no key current_price, so the html does not render anything for that column. If the key gets created in the for loop in index, then it will be available to the html. Something like record['current_price'] = share['price'].


1

The problem is in the index function. The html is expecting a list named portfolio, but alas no such list is sent along with the render_template.


1

My first advice: insert return true; into the beginning of unload() so that it does nothing else. This will let you work on everything else. Next, insert #include <strings.h> to correct the compile error. Note the plural form of string. ;-) In load() the code creates a single node n. The problem is that it's reusing the node over and over and over. ...


1

[EDIT - previous answer deleted, irrelevant] Haven't seen this in a while. The problem lies with your return statements in the load function. You are returning 0's and 1's, not true or false. This can be confusing, especially when you confuse it with another programming standard of returning 0 for success and a non-zero for errors. The load() function ...


Only top voted, non community-wiki answers of a minimum length are eligible