Why does VS2022 keep adding * after I type /*?

Jason Hay 20 Reputation points
2023-02-28T21:26:58.0166667+00:00

Why does VS2022 keep adding * after I type /*?

So annoying

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,573 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,520 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael Taylor 47,711 Reputation points
    2023-02-28T21:39:53.46+00:00

    If you mean on the next line like this:

    /*
     *
    

    Then that is because most block-styled languages follow the pattern of putting an asterisk on each new line so multiline comments indent to the same level. It is a consistency thing.

    If you want to disable this convention for some reason then you can do so by going to Tools \ Options and then Text Editor \ C/C++ \ Code Style \ General and uncheck the Insert existing comment style option.

    enter image description here

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful