OK, the title might sound a bit confusing. I'm currently converting code to work on 64 bit machines. One problem I'm having right now is the following call to printf:
This is the code working on a 32 bit machine. But fgetln requires a size_t argument so I changed it to:Code:int readLen; pLine = fgetln( pFile, &readLen ); printf(" %*.*s", readLen, readLen, pLine );
Now the printf doesn't work any more, because the width and precision modifiers have to be of type int (see printf - C++ Reference)Code:size_t readLen; pLine = fgetln( pFile, &readLen ); printf(" %*.*s", readLen, readLen, pLine );
Can someone tell me what's the best way to solve this problem (i.e. get the printf working with the width and precision modifiers)?
Thanks a lot!