I want to store gigabytes of media locally - and have them automatically removed when the app is uninstalled.
The average but skilled user is capable of copying the media elsewhere and would backup his disk regularly.
However, most C++ programs have a main
accepting program arguments, and you could conventionally provide program arguments to remove the data. Be sure to properly document your design.
See this answer. On Unix or POSIX systems (Linux, MacOSX, FreeBSD....), you might accept a --clean-all-the-mess
program option.
I'm guessing there's a convention followed across Windows, Mac and Linux.
As far as I know, this guess is wrong. (things are much more complex)
More generally, read about package managers. There are many of them. See guix for an interesting example. Debian and Fedora have different ones. Look into GNU stow and autoconf.
You could want to use a database, perhaps SQLite or PostGreSQL.
On Linux, see also Advanced Linux Programming then syscalls(2) and more about systemd.
On Windows, read about the WinAPI.
Is there a convention for the paths would I need to store these
Linux has hier(7) but some Linux distributions (including Android) don't follow that.
My recommendation: study the C++ code of some open source software close to your goals. You could find some of them on github or gitlab or SoftwareHeritage. See also POCO.