View Full Version : C++ compile issue
Freeman
10-02-2007, 04:51 AM
I get a expected `;' before "MOD" compile error. Why is that and how do I make it work?
Freeman
10-02-2007, 05:25 AM
Figured it out. If you put in MOD, it is an invalid command. The character for MOD is the % symbol. If you want it to do the MOD of a number then you must do number % number. Thanks for at least looking to see if you could help.
djr33
10-02-2007, 06:27 AM
Ah. Modulus. Haven't used it in C++, but that's fairly common in PHP.
5%4 = 1. 6%3 = 0. 9%5 = 4. Remainder of division. Helping in looping setups.
Though you may already know this. If not, should give you some idea.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.