I came across this piece of code and I don’t understand it:
catch (MyException & /* q */) {
What do the /* and */ do? They look like a comment to me but that can’t be right. Doesn’t a variable need to be specified?
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.
Yes, these are C-style comments. They are used to exclude the name of an unused variable, most likely to avoid a warning from the compiler. You can read about them in a C or C++ book of your choice.