Parentheses and commas between variables

I want to add parentheses and commas to this code to make it look like (x,y)

cout<<"Circle Circ 1 and Circ2 contain point "<<CircxQ<<CircyQ;

where (circxq,circyq)
std::cout << "Circle Circ1 and Circ2 contain point (" << CircxQ << ", " << CircyQ << ")\n";
What is the problem?

Do you realize that A and B are equivalent:
1
2
3
4
5
6
7
// A
cout<<"Circle Circ 1 and Circ2 contain point "<<CircxQ<<CircyQ;

// B
cout << "Circle Circ 1 and Circ2 contain point ";
cout << CircxQ;
cout << CircyQ;

Therefore, if you want to print a comma, then print a comma.
Topic archived. No new replies allowed.