lundi 24 septembre 2018

Define "const int" from double variables

I need to define obtain a "const int Iteration" to define the array "a[Iteration]". Iteration is derived from 2 "double variables". With below, I can not successfully define a[Iteration]. please help. thanks

    double Range=9.4;
    double Step=2.2;
    const int Iteration=(int)(Range/Step);

    int a[Iteration]={0};

Aucun commentaire:

Enregistrer un commentaire