Open koziscool opened 8 months ago
This code has a basic typo in it, the interpreter runs it fine (when edited correctly). Should I delete this, or leave it here in case I reproduce a similar error?
Ok so here might be a better example, that's not a typo
long int e10(vector<long int>* primes, int limit){
long int total = 0;
vector<long int>::iterator: i = primes->begin();
while( *i < limit ){
total += *i;
i++;
}
return total;
}
Here the interpreter says:
input_line_14:2:51: error: function definition is not allowed here
long int e10(vector<long int>* primes, int limit){
^
Interpreter Error:
again runs fine on gcc
Eg, this code:
produces this error:
Btw, that code seems to run just fine on gcc.