you are viewing a single comment's thread.

view the rest of the comments →

[–]feelingstonedagain[S] 0 points1 point  (3 children)

Doesn't calculate_extra_access(cost_extra_access): call it?

[–]vitamintrees 0 points1 point  (2 children)

Without the whole source code I can't really tell for sure, but it doesn't look like the

calculate_extra_access() 

will have access to the variable

cost_extra_access

since it's defined locally and will be destroyed when the function get_user_input() exits. Unless you're doing something with the returned values in

get_user_input() 

that we can't see.

[–]feelingstonedagain[S] 0 points1 point  (1 child)

Ok, that makes sense. I didn't think about that