I've been at this for an hour now and I keep getting this error. Can somebody tell me what went wrong?
(test.cpp:13:1: error: expected unqualified-id before â{â token)
#include <iostream>
#include <cassert>
#include <vector>
using namespace std;
bool isStrictlyIncreasing(const vector<int> & v);
{
for (int i = 0; i < v.size(); ++i)
if (v.push_back(i) < v.push_back(i + 1))
{
return true;
}
else if (v.push_back(i) == v.push_back(i + 1))
{
return false;
}
}
int main()
{
vector<int> v;
v.push_back(2);
v.push_back(6);
v.push_back(10);
v.push_back(13);
v.push_back(17);
assert(isStrictlyIncreasing());
}
Last edited on
It's the stray semicolon on the previous line that's producing that error.