Rename foo.m to foo.cpp