Originally posted by: Rym
Hi
I would like to extract data from a text file. Suppose that i have .txt:
5
10
12
14
Suppose that i would like to fill the array CPU with the data from the text
for (var i in CPU)
{
CPU[i]= line by line from the text
}
In C language i did
int =4;
char cpus[n];
int cpu[n];
cur_posc=ic;
fseek(fichierc, cur_posc,0);
i=0;
while(i<n)
{
fgets(cpus,1000,fichierc);
cpu[i]=atoi(cpus);
cur_posc = ftell(fichierc);
i++;
}
#DecisionOptimization#OPLusingCPLEXOptimizer