I was trying to write a very simple function to read ADC 20 times, remove min and max and find the average. I stored the readings in a std::vector arr, but this error keeps showing up
…/wiring/inc/spark_wiring_arduino_constants.h:111:18: expected unqualified-id before ‘(’ token
I realized even only include the “vector” library and not do anything else would still give the same error.
Here’s my code. I commented out the function that has vectors in it. But even this is giving me error.
#include "ADS1015_async.h" #include "application.h" #include "MCP4728.h" #include "math.h" #undef swap #include "vector" //using namespace std; //std::vector<int> arr;
Once I comment out