PDA

View Full Version : Problem with converting my code from C to C++



Dan_182
10-31-2013, 02:01 PM
I'm pretty new to this. I've been using MinGW and Msys, I have been successfully creating programs in C but when I try to convert it over to C++ I get all sorts of problems. One, it wont recognize my glutTimerFunc as valid and tells me my glOrtho has too many arguments even though it doesn't. Any help would be appreciated.

GClements
10-31-2013, 05:06 PM
I'm pretty new to this. I've been using MinGW and Msys, I have been successfully creating programs in C but when I try to convert it over to C++ I get all sorts of problems. One, it wont recognize my glutTimerFunc as valid
Ensure that the function is actually a function (not a method) and has C linkage.

and tells me my glOrtho has too many arguments even though it doesn't.
Post the actual code, along with the actual error message.

Dan_182
10-31-2013, 06:36 PM
Thanks! It was an animation method not a function. But now that brings up another question (if you know the answer), why is it when I compiled the program in C it didn't care whether it was a function or not but in C++ it does even if I don't use the value that was passed into it?