Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Also, it's my hunch that the statements like vm.error = error; that are calls to functions aren't needed unless the view has something that uses them, such as ng-submit. Internal calls can be made to the functions directly.
Agree. I haven't used DevCpp in a while; I either use Netbeans or Eclipse or plain Vim and gcc. Also, I don't know why, but DevCpp has abysmal error messages.
It seems the OP is using DevCpp. That's the only place where I've seen system("PAUSE") being used to wait for the user. I'm unsure whether getchar() works or not.
@user3789184 The sole purpose of n and p here is to be passed to the method. The arguments are passed by value, meaning copies are made that are used in the method body. The original nand p are unchanged from the getExponent method. So it just wastes memory to assign values of n and p to a variable. An exception is when you have to declare them as constants similar to C's #define where you define them as const in the main public class.
@ErickWong Yes, that's exactly what I interpreted that to be. Also the fact that 162 is denoted as 2^1 * 3^4. I imagined 324, for example, would be represented as 2^2 * 3^4.