自定义的函数:
主函数:
你的ScanLineSegment方法没有返回值,不能当作参数传到glutDisplayFunc里面
你只是要把函数指针传进去吧?ScanLineSegment(a,m) ->>ScanLineSegment试试,
还不行就void (*func)(void) = ScanLineSegment;
ScanLineSegment(a,m) ->> func
C和C++完整教程:https://blog.csdn.net/it_xiangqiang/category_10581430.html