0

I read in some example this expresion,

std::cout << ('c',value) << std::endl;

more or less like that, I tried with different values of c, value ... but it's like ignoring the 'c' or whatever I put in first places or more only prints in console the last element inside () if there are several. I think I look it in cppreference.com or maybe in a youtube tutorial, I really don't remember, but as I tried it doesn't works ... Sorry if it's a silly question, I'm really green in knowledge

Anxon Pués
  • 117
  • 5
  • 2
    `('c',value)` uses the *comma operator*. It basically means evaluate the first thing (`'c'`), then discard that result, then evaluate the second thing (`value`) and use that result. – Eljay Mar 29 '22 at 22:27

0 Answers0