PRINT FILE
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;
a.Pow(b);
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
Thanks
Excuse me i'm french and my english is not well...
You can print it in this way:
a = 27;
b = 28;
a.Pow(b);
std::string astr = a.ToString();
fprintf(pFile,"N = %s", astr.c_str());