这篇MSDN文章指出getcwd()已被弃用,而且应该使用ISO C++兼容的_getcwd,这就提出了一个问题:是什么让getcwd()不符合ISO标准?
我正在尝试创建一个使用该fopen();函数的程序。
我的问题是fopen();找不到文件。
perror("Error");输出时Error: No such file or directory.我已经阅读了这篇文章,但它们并没有解决我的问题:
fopen();文件的 exec 路径,并且我已经检查过文件名是我要查找的特定文件名。exec("pwd");看到我是正确的目录。我的操作系统是 ubuntu mate 20.04。
这是我的代码:
/* File Name: firstTransaction.c
* File Mission: scan the input files and make the first transaction.
*/
#include "defines.h"
/*
* first transaction file:
* Allocating new memory for the assembly source file.
* Scanning the assembly source file.
* @param filename - the filename of …Run Code Online (Sandbox Code Playgroud)