Home > Back-end >  Strlen () and sizeof () return values size_t is unsigned long integer?
Strlen () and sizeof () return values size_t is unsigned long integer?

Time:12-24

I check the online information is said unsigned integer, using GCC compiler error returned is a long unsigned int, so grammar is changed or has always been an unsigned long integer?
Running environment is ubuntu20.04, GCC 5.4.0

CodePudding user response:

Size_t is unsigned int

CodePudding user response:

In the IDE, the right mouse button point don't understand the symbol strlen, sizeof, size_t, choose to define in the pop-up menu,

CodePudding user response:

IDE can be used under Ubuntu VSCode CodeBlock, Idea,...

CodePudding user response:

According to the compiler to set, we can look it up in the environment defined size_t what type, search on the net, look at this size_t defined in the header file ~

CodePudding user response:

references 4 building self-confidence boy reply:
according to it's up to the compiler, you can look it up in the environment defined size_t what type, search on the net, look at this size_t defined in the header file ~

Than I # 3, this method not only time-consuming, you also not enough,

CodePudding user response:

reference 5 floor 4 teacher zhao reply:
Quote: refer to 4th floor confident boy reply:
according to it's up to the compiler, you can look it up in the environment defined size_t what type, search on the net, look at this size_t defined in the header file ~

Than I # 3 of the way, this method not only time-consuming, you also not enough,

If have no you said these environment, use vim, GCC manual writing and compiling, time-consuming but may have a way to ensure that no problem

CodePudding user response:

reference 6 building self-confidence boy reply:
Quote: refer to fifth floor 4 teacher zhao response:
Quote: refer to 4th floor confident boy reply:
according to it's up to the compiler, you can look it up in the environment defined size_t what type, search on the net, look at this size_t defined in the header file ~

Than I # 3 of the way, this method not only time-consuming, you also not enough,

If have no you said these environment, use vim, GCC manual writing and compiling, time-consuming but may have a way to ensure that no problem

The search on the net and not necessarily the machine use. H file unanimous agreement,

CodePudding user response:

refer to 7th floor 4 teacher zhao response:
Quote: refer to the sixth floor confident boy reply:
Quote: refer to the 5 floor 4 teacher zhao response:
Quote: refer to 4th floor confident boy reply:
, according to it's up to the compiler can check environment definition size_t what type, search on the net, look at this size_t defined in the header file ~

Than I # 3 of the way, this method not only time-consuming, you also not enough,

If have no you said these environment, use vim, GCC manual writing and compiling, time-consuming but may have a way to ensure that no problem

The search on the net and not necessarily the machine use. H file agreed unanimously,

To find their own system, pay attention to the version number, and this change will not be huge
  • Related