Currently converting my comp sci project from c to c++. According to our prof we can apparently convert a single set of files at a time, which is... kind of working, I don't really know. Not getting errors about the rest of the project with a few exceptions.
So, main problem, I have very little experience with c++ still, don't really have any code to look back at yet, and my ability to google for stuff seems to have degraded. So can anyone point out what I'm doing wrong here?
First error that seems fixable (Don't get me started on what the fuck is going on with the unions)-
rt.c:83:79: error: cannot convert ‘Vector (*)()’ to ‘Vector*’ in argument passing
wtf = scene.obj[j].intersect(ray, scene.obj[j], &normal, &intpnt, &scale);
intersect is a function pointer which will be altered into a virtual function in the future(I think).
int (*intersect)(RAY_T ray, struct OBJ_T obj, Vector *normal, Vector *intpnt, double *scale);
Next error is
error: assignment of function ‘Vector closeNormal()’
closeNormal = normal;
closeNormal and normal are both supposed to be Vectors, and I just want closeNormal to equal normal. Both were declared as-
Vector closeNormal();
Vector normal();
All of this worked when Vector was just a struct, and I haven't changed any of the actual logic yet. Just changed vector, and then went though and made sure everything matched the new function and class names.
Sorry about poor formatting, really tired from looking at a minimum of 60+ errors per compile.