I want to create a function in C++ using cout that has the same as the println function in java. This means that the call should be something like this:
int a=5
println("A string" + a);
the variable a should have any basic type. What kind of parameter should I have in this case and how would it work?
Thanks
System.out.println
isn't what makes the+
work. – Shinshinaa
is 5,"A string" + a
is"ing"
. – Charmer