By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,431 Members | 1,739 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,431 IT Pros & Developers. It's quick & easy.

trouble with compiling my program

P: 19
Hi here is my problem when I compile my program it gives me the error " error C2296: '%' : illegal, left operand has type 'double". any help in explaining this is much appreciated.
Expand|Select|Wrap|Line Numbers
  2. quot = n1 / n2;
  3. mod = n1 % n2;
Nov 16 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 469
The modulus operator can only be used with two ints.
Nov 16 '08 #2

P: 19
oh duh thanks for the help.
Nov 16 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.