I have a linux based code in C++ which uses G++ for for execution on linux. The authors of the code mention that wiht some changes, it can be compiled on winsows environment too..
also, I found the following code in the source files..
the following error is repeated for many functions..
error C2660: 'function name' : function does not take 2 arguments
this is specifically in the code of the file monty.h, which is part of an entire library...
Here is the code:
error C2660: 'nres_modadd' : function does not take 2 arguments
error C2660: 'nres_modsub' : function does not take 2 arguments
error C2660: 'nres_modmult' : function does not take 2 arguments
error C2660: 'nres_premult' : function does not take 2 arguments
All errors are from the file, monty.h, which is part of the miracl library used for mathematical calculations.. miracl library provides full support for windows.. so this might not be a syntax error..
Here is the code for tht file..
all these functions are taking two arguments... but still the error says doesn't..
is it possible tht error is generating from the code where they are actually called..
#ifndef MONTY_H
#define MONTY_H
#include <big.h>
class ZZn
{
Big fn;
public:
ZZn() { }
ZZn(int i) { if (i==0) fn=0; else fn=nres((Big)i); }
ZZn(long lg){ if (lg==0L) fn=0; else fn=nres((Big)lg); }
ZZn(const Big& b) { fn=nres(b); } /* Big -> ZZn */
ZZn(big& b) {copy(b,fn.getbig());}
ZZn(const ZZn& b) { fn=b.fn; }
ZZn(char* s){ fn=nres((Big)s); }
It is because you are not passing the correct number of arguments to the functions...check the definitions, it's possible that they could be different on windows.