<string> not found when included in a .h file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-03 5:56 AM
Hi,
I need to use <string> (standard in C++ libraries and am working in a C++ project. My header file is a normal .h, and on compiling I get the below. Oddly, if I select string in the header and view declaration, the standard file opens up just fine?
Any ideas people?
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-03 6:16 AM
You cannot include C++ headers from a C file.
You will have to rework the project so this only gets included from within *.cpp files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-03 6:16 AM
You cannot include C++ headers from a C file.
You will have to rework the project so this only gets included from within *.cpp files.
