Can't get .cpp out of simplemax

AudioMatt's icon

I usually start by copying simplemax but renaming simplemax.c to simplemax.cpp causes a build fail.

error: No matching function for call to 'object_alloc'

xcode notes that
1. Candidate function not viable: cannot convert argument of incomplete type 'void *' to 't_class *' (aka 'maxclass *') for 1st argument

What's the deal here

Owen Green's icon

C++ is fussier about types, and simplemax declares its class pointer as void*. If you change the declaration to
static t_class *simplemax_class;
You should be good.