+ 1

What is ... (I mean the ... symbol)?

Sooooo, in one of the codes in SL that involved switch statements, i saw that to check if the value is in the range of two numbers, the user wrote: ... . What exactly is this symbol and can I use it outside a switch statement?

28th Aug 2019, 8:05 PM
CeePlusPlus
CeePlusPlus - avatar
3 ответов
+ 3
From the looks of it (after some googling haha), those types of ellipsis seem to be known as case ranges, and can only be uses when defining a specific range of number in a switch statement - https://stackoverflow.com/questions/5924681/are-elipses-in-case-statements-standard-c-c
28th Aug 2019, 8:22 PM
Faisal
Faisal - avatar
+ 3
28th Aug 2019, 8:19 PM
CeePlusPlus
CeePlusPlus - avatar
+ 1
What exactly is the code that you're referring to? To my knowledge, the only use of ellipsis (...) in C++ is for passing unknown parameters to a function 🤷‍♂️
28th Aug 2019, 8:13 PM
Faisal
Faisal - avatar