How do I use "," instead of ";" in C++
Difference between en1 and en2, changed 11 character(s)
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 showesd errors, can anybody teach me how to use the comma properly? I think it will improve my coding speed by alot.↵
Thanks.↵



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)