Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 398 characters in body
Source Link
JaredPar
  • 759.4k
  • 152
  • 1.3k
  • 1.5k

The problem is that you haven't importedvector<T> lives in the std namespace and you're attempting to use the type without any qualification or appropriate using statement. Add The safest fix is to explicitly qualify uses of the following after your includestype with the std prefix.

using std::vector;vector<neuron> nrns; 

Or qualifyThis can also be fixed by explicitly importing the usages oftype via a vector<T>using with the namespacestatement.

using std::vector<neuron> nrns;vector; 

I would avoid this approach though. Adding using statements to header files, while legal, is bad practice because it can change how items are compiled. This form safer than a blanket import of std but is still not great.

The problem is that you haven't imported the std namespace. Add the following after your includes

using std::vector; 

Or qualify the usages of vector<T> with the namespace.

std::vector<neuron> nrns; 

The problem is that vector<T> lives in the std namespace and you're attempting to use the type without any qualification or appropriate using statement. The safest fix is to explicitly qualify uses of the type with the std prefix.

std::vector<neuron> nrns; 

This can also be fixed by explicitly importing the type via a using statement.

using std::vector; 

I would avoid this approach though. Adding using statements to header files, while legal, is bad practice because it can change how items are compiled. This form safer than a blanket import of std but is still not great.

deleted 51 characters in body
Source Link
JaredPar
  • 759.4k
  • 152
  • 1.3k
  • 1.5k

The problem is that you haven't imported the std namespace. Add the following after your includes

using std::vector; 

Or qualify the usages of vector<T> with the namespace.

std::vector<neuron> nrns; 

Or the more general

using namespace std; 

The problem is that you haven't imported the std namespace. Add the following after your includes

using std::vector; 

Or qualify the usages of vector<T> with the namespace.

std::vector<neuron> nrns; 

Or the more general

using namespace std; 

The problem is that you haven't imported the std namespace. Add the following after your includes

using std::vector; 

Or qualify the usages of vector<T> with the namespace.

std::vector<neuron> nrns; 
deleted 79 characters in body
Source Link
JaredPar
  • 759.4k
  • 152
  • 1.3k
  • 1.5k

The problem is that you haven't imported the std namespace. Add the following after your includes

using namespace std;std::vector; 

Or qualify the usages of vector<T> with the namespace.

std::vector<neuron> nrns; 

Or as others have suggesetd in the comments the more constrained using of specifically vector.general

using std::vector;namespace std; 

The problem is that you haven't imported the std namespace. Add the following after your includes

using namespace std; 

Or qualify the usages of vector<T> with the namespace.

std::vector<neuron> nrns; 

Or as others have suggesetd in the comments the more constrained using of specifically vector.

using std::vector; 

The problem is that you haven't imported the std namespace. Add the following after your includes

using std::vector; 

Or qualify the usages of vector<T> with the namespace.

std::vector<neuron> nrns; 

Or the more general

using namespace std; 
added 124 characters in body
Source Link
JaredPar
  • 759.4k
  • 152
  • 1.3k
  • 1.5k
Loading
added 10 characters in body
Source Link
JaredPar
  • 759.4k
  • 152
  • 1.3k
  • 1.5k
Loading
Source Link
JaredPar
  • 759.4k
  • 152
  • 1.3k
  • 1.5k
Loading