Error compiling C ++ - programs in Visual Studio 2010

Hi guys, I can’t get my next C ++ program compiled in Visual Studio 2010. I already have a working assembly of the same code, so I know that the code is correct. But I have no idea what and how it was compiled.

So, I would appreciate it if someone could just copy the code and try to compile it in VS 2010.

The code-

http://codepad.org/4VtrVBdK

new-- OK did the editing according to the comments below. Now, the only problems that seem to remain are related to calls to overloaded functions ... so how can this be done?

+3
source share
2 answers

so i know the code is correct

, "", . . :

for(unsigned int i=0;i<GPNO;i++)    //SORTING ACCORDING TO FITNESS
    for(unsigned int j=i+1;j<GPNO;j++)
        if((gp[i]->fitness)>(gp[j]->fitness))
        {
            gp[i]->mycopy(tmp);
            gp[j]->mycopy(gp[i]);
            tmp->mycopy(gp[j]);
        }



for(i=1;i<=no;i++)
{
    gp[i]->mycopy(gp[GPNO-i]);
}

for i . , VC6, .

, pow. ( ), :

pf[i].frq+=(unsigned int)pow(2,2*PF-1);

, pow . , . :

pf[i].frq+=(unsigned int)pow(2.0,2*PF-1);

, .

:

#include "stdlib.h"
#include "conio.h"
#include "math.h"

. , , . .

+2

, using namespace std;

0

Source: https://habr.com/ru/post/1789075/


All Articles