Categories
Mastering Development

is there a way to use same variables in different functions without using global?

check1 = False def adding(): global f_num, s_num, check1 check1 = True e.delete(0, END) f_num = e.get() s_num = e.get() e.delete(0, END) def show_answer(): if check1: e.insert(0,f_num+s_num) I’m new to coding and using this website…I’m using tkinter module to build a calculator. when I set the show_answer() function in the equal sign button it was […]

Categories
Development

Why is the binary search function throwing an error?

I am trying to search for a long long int using the binary_search function, but the function is throwing an error which I cannot interpret. Could you help me with this problem? I am using code :: blocks and C ++ 11. Erro: ..error: no match for call to ‘(main()::<lambda(const Client&, const Client&)>) (const int&, […]