Remove file extension from file name

53 views Asked by At

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;
        }
0

There are 0 answers