How to make C++ #define statement doesn't wrap after VScode formatting?

Viewed 132

When I write C++ code in Visual Studio Code after automatically formatting, it will be

#define IOS                      \
    ios::sync_with_stdio(false); \
    cin.tie(0);                  \
    cout.tie(0);
#define printvec(vec) \
    for (auto e : vec) cout << e << " ";

Instead I want to do like:

#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define printvec(vec) for(auto e:vec) cout<<e<<" ";

How do I do that?

I’ve already installed the C/C++ extension from the marketplace.

0 Answers
Related