admin管理员组

文章数量:1026989

How can I configure VSCode, C/C++ Formatting. I have code:

int main()
{
    std::cout << "Hello, Stack" << std::endl;
    if(false)
        return 0;
    for(;;)
        break;
    while(0)
        break;
    do
    {} while(0);
    
    return 0;
}

After pushing hot key Alt+shift+f (editor.action.formatFocument):

int main()
{
    std::cout << "Hello, Stack" << std::endl;
    if (false)
        return 0;
    for (;;)
        break;
    while (0)
        break;
    do
    {
    } while (0);

    return 0;
}

Is parameter "C_Cpp > Vc Format > Space: After Keywords In Control Flow Statements" must be off or what?

Now this parameter is off. But if I on it nothing happened.

How can I configure VSCode, C/C++ Formatting. I have code:

int main()
{
    std::cout << "Hello, Stack" << std::endl;
    if(false)
        return 0;
    for(;;)
        break;
    while(0)
        break;
    do
    {} while(0);
    
    return 0;
}

After pushing hot key Alt+shift+f (editor.action.formatFocument):

int main()
{
    std::cout << "Hello, Stack" << std::endl;
    if (false)
        return 0;
    for (;;)
        break;
    while (0)
        break;
    do
    {
    } while (0);

    return 0;
}

Is parameter "C_Cpp > Vc Format > Space: After Keywords In Control Flow Statements" must be off or what?

Now this parameter is off. But if I on it nothing happened.

本文标签: cvscode CCpp space after ifforwhileetcStack Overflow