http://blog.sina.com.cn/s/blog_44e6424c0100yrjr.html
打印当前目录代码如下,别忘了头文件
#include <QDir>
#include <QtDebug>
QString path = QDir ::currentPath ();
qDebug() << "currentPath:" << path;
获取当前目录路径的C++代码示例
本文提供了一个简单的C++代码片段,用于打印当前目录路径,包括必要的头文件引用。
http://blog.sina.com.cn/s/blog_44e6424c0100yrjr.html
打印当前目录代码如下,别忘了头文件
#include <QDir>
#include <QtDebug>
qDebug() << "currentPath:" << path;
7991
2万+
505

被折叠的 条评论
为什么被折叠?