Link to home
Start Free TrialLog in
Avatar of 7982681
7982681

asked on

fatal error: vector: No such file or directory Visual Studio 2015 for Arduino

Visual Studio 2015 for Arduino C++.  

My first program gives "fatal error: vector: No such file or directory".  Tried various option from web such as vector.h etc.

#include <vector>
using std::vector;

void setup() {
      Serial.begin(9600);
}

void loop() {
      std::vector<int> newvector;
      Serial.println("Hi");
      delay(100);
}
Avatar of 7982681
7982681

ASKER

Or, to put it another way that I think is related, I can put:

String xx = "";

in the .ino file but not in a .cpp file!

I'm assuming some library or reference is needed.

I get these same problems with Eclipse (Arduino version) and Visual Studio for Arduino!!!
ASKER CERTIFIED SOLUTION
Avatar of pepr
pepr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 7982681

ASKER

Thanks about the library  In my ignorance i did not realise the Arduino was different from standard.