calcRoots(coeffs, lengthc, roots, lengthr);
cout << "Testing whether the roots exist or not: " << calcRoots << endl;
This is not how you access the return value of a function from the calling code. You need to store the return value from calcRoots() in a variable. Even the most rudimentary of textbooks will explain this, so I strongly recommend you re-read the section on functions, as it's important to understand how to call functions properly.
When you use the name of a function on its own, without parentheses, then it's treated as a pointer to that function, which means it will have a non-zero value.
Sorry I was not trying to be selfish, I just didn't want my professor to Google my code and find it on here and then claim I was plagiarizing. I put the code back up, oh and for future reference you could try to be a little less rude to people. Thanks for the help.
Sorry, but I don't believe I was being rude. What you did is something that happens a lot here, and it's an abuse of this forum, and of the time and effort people put in to help others.
I would note that I was the one who explained what your problem was and how to fix it. In your haste to delete your code, you couldn't even find time to acknowledge that, or say "Thanks", so I think you should, perhaps, re-examine exactly who was being rude in this thread.