What do people use to denote that size_t is invalid? -1 does not work, and 0 can be a valid size.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Perhaps
((size_t)-1)?Strictly speaking, it is a valid size, but once you have this one you’re not likely to need any other 😉