When should I just use “int” versus more sign-specific or size-specific types?

前端 未结 5 469
眼角桃花
眼角桃花 2021-01-30 06:18

I have a little VM for a programming language implemented in C. It supports being compiled under both 32-bit and 64-bit architectures as well as both C and C++.

I\'m try

5条回答
  •  醉话见心
    2021-01-30 07:13

    Keep large numbers that are used to access members of arrays, or control buffers as size_t.

    For an example of a project that makes use of size_t, refer to GNU's dd.c, line 155.

提交回复
热议问题