Error: Binding reference of type .. to const

I’m trying to overload operator<<. When trying I got an error saying Error: Passing const as this argument discards qualifiers So I added const to my functions but now I’m getting this error: Binding reference of type .. to const. Main.cpp ostream& operator<<(ostream& ostr, const Student& stud){ float mo = 0; int quantity = stud.get_grade().size();\… Read More Error: Binding reference of type .. to const

Python binding variables

I am completely lost here: v_sql = "SELECT widget_name, widget_url FROM widget_calls WHERE widget_name = :widget" cursor.execute(v_sql, widget=widget_name) df_wid = pd.read_sql(v_sql, con=connection) Result: pandas.io.sql.DatabaseError: Execution failed on sql ‘SELECT widget_name, widget_url FROM widget_calls WHERE widget_name = :widget’: ORA-01008: not all variables bound There is 1 bind variable, :widget, and 1 declaration in the execute. So,… Read More Python binding variables

Runtime error: reference binding to null pointer of type 'int' (stl_vector.h) c++

I know that this error refers to undefined behavior (I think), but I’ve reread my code 20 times and I don’t see what the UB is!? I’m doing Leetcode 238. Product of Array Except Self and here’s my code (btw I don’t know if this solution is right): class Solution { public: vector<int> productExceptSelf(vector<int>& nums)… Read More Runtime error: reference binding to null pointer of type 'int' (stl_vector.h) c++

Group of structured binding errors, pertains to neural networking

so i downloaded a library that hasnt been in use in years, for Neural Evolutionary Augmenting Topologies. Basically, a neural network that evolves. It came with many, MANY errors out of the box (somewhere around 20-30) and i managed to fix them all, except for these: Error C3694 a structured binding declaration can contain no… Read More Group of structured binding errors, pertains to neural networking