C++ coding format

Hi people, I am writing a documentation for my assignment, and need to do it in a professional way. My dilemma is, if a line of code, does not fit in the same line of the A4, what should I do please? Taking for example that an if statement doesn't fit in, due to the conditions in the if statement are long. Is there any style with which I could refer to please? Thanks in advance.
Regards
OrangeApple
Just break up your if statement, if possible.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Instead of this...
if (condition && condition && condition && condition && condition)
{
   // Do stuff
}

// Do this...
if (condition &&
    condition &&
    condition &&
    condition)
{
   // Do stuff
}
Thank you my friend you were really helpful. Really appreciated.
Regards
OrangeApple
Topic archived. No new replies allowed.