mardi 3 septembre 2019

What's the C++ standard convention for single line if statements?

I was wondering which of the following examples is the C++ standard convention for a single line if statement?

A)

if (isTrue) 
    myFunction();

B)

if (isTrue) myFunction();

C)

if (isTrue) { 
    myFunction();
}

D)

if (isTrue) { myFunction(); }

Aucun commentaire:

Enregistrer un commentaire