-1

I'm getting the following error message when I try to run the line vector data in my program:

Unable to open 'stl_vector.h': Unable to read file (Error: File not found (\usr\include\c++\7\bits\stl_vector.h))

I have #include and using namespace std at the top of my file and have no issues compiling or starting the debugger (the issue arises when I try to run the line "vector data" through the debugger. Any suggestions for how to solve this issue would be appreciated!

rioV8
  • 18,123
  • 3
  • 18
  • 35
  • Does this answer your question? [#include with visual studio does not compile](https://stackoverflow.com/questions/25337300/include-bits-stdc-h-with-visual-studio-does-not-compile) – Michael Chourdakis Jan 08 '20 at 20:43

2 Answers2

1

two possible suggestions.

  1. the library references std vector you are getting an error for st(l)_vector.
  2. you are using a reference type file location, maybe try writing out the whole path. also make sure that file actually exists in that location.

might need to provide more information or context.

Andrew S
  • 11
  • 3
0

There is no bits/... header in Visual Studio. Such a header is not standard.

Use #include <vector> and avoid using namespace std outside a function.

Related: https://stackoverflow.com/Questions/31816095/Why-Should-I-Not-Include-Bits-Stdc-H.

Michael Chourdakis
  • 9,693
  • 2
  • 38
  • 66