The package you're looking for is confusingly named gcc-c++.
gcc-c++
instead of g++ you have to write gcc-c++
sudo dnf install gcc-c++
You should exec:
dnf install gcc-c++