Hello, I'm trying to print the results in a file like this :

int _tmain(int argc, _TCHAR* argv[])
int nb, n, p, nbp, r, m;
int cste, cst, tr;

FILE * pFile = NULL;
pFile = fopen ("Test.txt","w");

ttmath::UInt<30> a,b;
MyInt a, b, c, res;
a = 27;
b = 28;
fprintf(pFile,"N = %d", a);

The result in the file is -2652......

and with fprintf(pFile,"N = %s", a.ToString());
the result is lü...

Is there a specific syntax ? %??? like %i %s

Excuse me i'm french and my english is not well...

Added by: tomek, 2018 X 01, Last modified: 2018 X 01

You can print it in this way:

a = 27;
b = 28;

std::string astr = a.ToString();
fprintf(pFile,"N = %s", astr.c_str());