Y
Hacker News
new
|
ask
|
show
|
jobs
by
mineo
4218 days ago
That's because gcc is trying to compile it as C, not C++. You need to call the file "test.cpp" or explicitly use g++ instead of gcc to compile it. (You'll also need to "#include <assert.h>" or it won't compile.)