'How to position asterisk near to variable name when declaring pointers in C in vscode auto formatting?
Currently if I write int * ptr; then auto-formatting would convert it to int* ptr; which I don't want. After googling a bit, I found here the fix for that. I have to use PointerAlignment: PAS_Middle. But I don't know where to add that.
In vscode settings, I tried to add it in C_Cpp: Clang_format_fallback_style and C_Cpp: Clang_format_style. Neither didn't work. There was no save/apply button in settings, so I hope it would automatically update settings as soon as change it. But nonetheless, whenever I format my C code using Shift+Alt+F, it puts asterisk near to the type!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
