VScode No such file or directory #include"两数之和.h" ^~~~~~~~~~~~~~~~ compilation terminated.
时间: 2023-08-28 22:13:51 浏览: 135
问题的错误提示是"VScode No such file or directory #include"两数之和.h" ^~~~~~~~~~~~~~~~ compilation terminated.",这表明在编译代码时找不到"两数之和.h"头文件。根据引用的内容,解决这个问题的方法是在CMakeList.txt中指定头文件的路径。你需要将以下代码添加到CMakeList.txt中适当的位置:
```cmake
include_directories(/你的头文件路径)
```
确保将"/你的头文件路径"替换为实际的头文件路径。这样编译器就能正确找到并包含"两数之和.h"头文件了。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* *3* [使用tengine部署模型时,编译报错:fatal error: NvInfer.h: No such file or directory | #include ...](https://blog.csdn.net/weixin_42211626/article/details/122426743)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
- *2* [编译内核常见问题1-fatal error: openssl/opensslv.h: No such file or directory #include ...](https://blog.csdn.net/woshisunyizhen/article/details/109580017)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文