K getTwoDat(servParams& spar, corrParams& cpar, string& dt)
{
string query = “corrTwoDat[” + cpar.symIn + “;” + to_string(cpar.interval) + “;” + dt + “]”;
K flip, result, columnNames, data, dtlist, procDict;
int row, col, nCols, nRows, handle=khp((S)(spar.host).c_str(), spar.port);
if(handle<0)printf(“Cannot connect\n”),exit(1);
else if(!handle)printf(“Wrong credentials\n”),exit(1);
result=k(handle,(S)query.c_str(),(K)0);
if(!result)
printf(“Network Error\n”),perror(“Network”),exit(1);
if(result->t==-128)
printf(“Server Error %s\n”,result->s),kclose(handle),exit(1);
kclose(handle);
if(result->t!=99&&result->t!=98) // accept table or dict
printf(“type %d\n”,result->t),r0(result),exit(1);
flip = kK(result->k)[1];
//flip = (result->k)[1];
//procDict = kK(
cout << kE(kK(flip)[35])[0] << “ss \n”;
return(flip);
}
This gets me the data. And as you can see the last line of the function prints just the two digits after decimal.