Code::Blocks Forums

User forums => Help => Topic started by: Reticent on April 24, 2011, 02:00:59 pm

Title: In the codeblocks 10.05 ,why I cant use the "lld" for long long int ???
Post by: Reticent on April 24, 2011, 02:00:59 pm
In the codeblocks 10.05 ,why I cant use the "lld" for long long int ??? But int the 8.02 I can use "lld" for long long int ,Why??
Title: Re: In the codeblocks 10.05 ,why I cant use the "lld" for long long int ???
Post by: Jenna on April 24, 2011, 02:29:53 pm
It's not a matter of Code::Blocks, it's a matter of the compiler.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_What_Code::Blocks_is_not.3F (http://wiki.codeblocks.org/index.php?title=FAQ#Q:_What_Code::Blocks_is_not.3F)

What exact is the errror you get ?
Title: Re: In the codeblocks 10.05 ,why I cant use the "lld" for long long int ???
Post by: Reticent on April 24, 2011, 05:16:08 pm
It's not a matter of Code::Blocks, it's a matter of the compiler.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_What_Code::Blocks_is_not.3F (http://wiki.codeblocks.org/index.php?title=FAQ#Q:_What_Code::Blocks_is_not.3F)

What exact is the errror you get ?

In the codeblocks 10.05 use the c++ scanf("%lld",&a); a is  long long int,then there are two warning

warning: unknown conversion type character 'l' in format
warning: too many arguments for format

but in the codeblocks 8.02 have no these warning .....
Title: Re: In the codeblocks 10.05 ,why I cant use the "lld" for long long int ???
Post by: stahta01 on April 24, 2011, 06:43:04 pm
And, the two compilers you are using is?

Edit: Include the Compiler version number in the answer!

Tim S.
Title: Re: In the codeblocks 10.05 ,why I cant use the "lld" for long long int ???
Post by: Reticent on April 26, 2011, 10:05:39 am
And, the two compilers you are using is?

Edit: Include the Compiler version number in the answer!

Tim S.

You mean the tdm-mingw-1.908.0-4.4.1-2 ??? Is it ?
Title: Re: In the codeblocks 10.05 ,why I cant use the "lld" for long long int ???
Post by: stahta01 on April 26, 2011, 06:48:51 pm

You mean the tdm-mingw-1.908.0-4.4.1-2 ??? Is it ?

The difference is caused by the compiler version of MinGW GCC used.

This IS NOT an Code::blocks problem in any way.
See and post on a site like this for Compiler only questions like this.
http://cboard.cprogramming.com/cplusplus-programming/118149-long-long-int-gplusplus-mingw.html

I get no warning with MinGW GCC 3.4.5 (shipped with CB 8.02 in some cases)
But, I get warnings using MinGW GCC 4.5.2 TDM-1.

I would guess you are using MinGW GCC 4.4.1 TDM-2

Tim S.
Title: Re: In the codeblocks 10.05 ,why I cant use the "lld" for long long int ???
Post by: Reticent on May 08, 2011, 02:06:51 am
And, the two compilers you are using is?

Edit: Include the Compiler version number in the answer!

Tim S.

You mean the tdm-mingw-1.908.0-4.4.1-2 ??? Is it ?


Thank you, I change the old version mingw will be well.
Title: Re: In the codeblocks 10.05 ,why I cant use the "lld" for long long int ???
Post by: stahta01 on May 08, 2011, 02:39:16 am
See and post on a site like this for Compiler only questions like this.
http://cboard.cprogramming.com/cplusplus-programming/118149-long-long-int-gplusplus-mingw.html

Follow and read the link!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Tim S.