你好,可以提供一下三维坐标的那个源码吗,为什么我的Qt用不了那个库
chatgpt: 不喜勿喷
#include <iostream>
using namespace std;
class Point3D {
public:
float x, y, z;
Point3D(float a, float b, float c) {
x = a;
y = b;
z = c;
}
};
int main() {
Point3D p1(1.0, 2.0, 3.0);
Point3D p2(4.0, 5.0, 6.0);
Point3D p3(7.0, 8.0, 9.0);
cout << "Point 1: (" << p1.x << ", " << p1.y << ", " << p1.z << ")" << endl;
cout << "Point 2: (" << p2.x << ", " << p2.y << ", " << p2.z << ")" << endl;
cout << "Point 3: (" << p3.x << ", " << p3.y << ", " << p3.z << ")" << endl;
return 0;
}
如果你在Qt中无法使用该程序,请确保你正确地配置了Qt的开发环境并包含了必要的头文件和库文件。你还可以尝试在Qt Creator中创建一个新的项目,并使用该程序作为模板,以确保你的环境设置正确。