首页 > 解决方案 > 如何打印积分内容?

问题描述

这是我的 C++ 代码的一部分。如何打印“Point pt”的坐标?

struct Point
{
int x;
int y;
};


struct queueNode
{
Point pt;// The cordinates 
int dist; 
};

标签: c++struct

解决方案


您可以编写一个类运算符重载,如字符串:http ://www.cplusplus.com/reference/string/string/operator%3C%3C/


推荐阅读