Menu

Some question when I use DEV-C++ to compile

Simon
2005-05-17
2012-09-26
  • Simon

    Simon - 2005-05-17

    Hello! I am a newbie in C programming.
    I think this question is better to be put here.
    I am using DEV C++ 4.992 and reading C Primer Plus as my starting up. By testing a little program about Specifiers, I begin to have some questions.

    The problem is that the program cannot read %ll specifier from a printf function correctly.
    At first, I thought this is MinGW's problem and then I realize that it is the problem of Windows. I found some post on MinGW that in Windows %I64d is the answer. They said it is related to MSVCRT.dll something. I don't quite understand the operations actually.

    The question is, what is the relationship of MSVCRT and printf function? Is it OS independent? Say, eg, in Linux, the syntax is a bit different?

    in Windows, use %I64d for 64-bit specifier
    in Linux, use %ll
    I think simliar problem will come again.
    If so, if I am learning my programming and want to understanding more and avoid simple but questionable problem like this, what and where should I read more?

    Any opinion and help is appreciated

    Thanks a lot!
    Simon

     
    • Wayne Keen

      Wayne Keen - 2005-05-18

      Simon,

      I suggest you do a search over in the Bloodshed forum, the topic of printing long long has come up there several times before.

      Wayne

       

Log in to post a comment.