Want to remove file extension from file name but receiving "Invalid initializer" error.
char filename[] = sdfileinfo.fname;
char filenameonly[64];
int i = 0;
while(1)
{
if (filename[i] == '.') break;
filenameonly[i] = filename[i];
i = i + 1;
}