How do I use "," instead of ";" in C++

Revision en2, by thekingisback, 2026-03-12 12:18:38

In some cases, I could write like this:

If(f==true)a++,b++;

Instead of

If(f==true){a++;b++;}

However, sometimes I can't write like that and the compiler showed errors, can anybody teach me how to use the comma properly? I think it will improve my coding speed by alot. Thanks.

Tags implementations

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English thekingisback 2026-03-12 12:18:38 11
en1 English thekingisback 2026-03-12 12:17:34 356 Initial revision (published)