开发者

Issue when using modulus operator or other arithmetic operands in a class [closed]

开发者 https://www.devze.com 2023-04-11 13:15 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago. 开发者_StackOverflow

Hello im having an issue when using the % operator in my class method functions.The console window pop ups but then another window opens when saying " ".exe has encountered a problem and needs to close. any idea? Heres the line of code of when i omit works fine.

r = gnumer % gden;


Is gden zero? Modulus by zero is just as bad as dividing by zero.


It may because gden ==0, or if gden is not a global or static variable, did you forget to initialize it?

0

精彩评论

暂无评论...
验证码 换一张
取 消