String concatenation

All, i'm working a program that does vector algebra and just trying to add a function that outputs a string with the vector formated for display. For some reason i've never mastered the rules for concatenation.

It's tell me where the comma's are it should be an integral or enum type.

1
2
3
4
5
6
string Vector::showVector()
{
	string temp = "(" + m_x + "," + m_y "," + m_z + ")";
	return temp;
}


Thanks in advance
You should convert m_x, n_y and m_z to std::string.
Topic archived. No new replies allowed.