How to split long lines of code in c++?

后端 未结 5 852
盖世英雄少女心
盖世英雄少女心 2020-12-25 10:43

I need to make sure none of the lines in my code exceeds a a certain length.

Normally I separate lines where there\'s a comma or another suitable break.

How

5条回答
  •  轮回少年
    2020-12-25 11:15

    cout<<"Error:This is a really long error "
    "message that exceeds the maximum permitted length.\n";
    

    or

    cout<<"Error:This is a really long error \
    message that exceeds the maximum permitted length.\n";
    

    or

    c\
    o\
    u\
    t<<"Error:This is a really long error \
    message that exceeds the maximum permitted length.\n";
    

提交回复
热议问题