This works when I compile with g++ with -std=c++11.
1 2 3 4 5 6 7
int main()
{
int *pointer = newint;
delete pointer;
return 0;
}
But, when I compile with -std=c++14 it does not.
Compile error:
/data/user/0/com.n0n3m4.droidc/files/gcc/tmpdir/ccVlJIIr.o: In function `main':
temp.c:(.text.startup+0x18): undefined reference to `operator delete(void*, unsigned int)'
collect2: error: ld returned 1 exit status
It does work when I do this, though.
1 2 3 4 5 6 7
int main()
{
int *pointer = newint;
delete[] pointer;
return 0;
}