Error in compiling the samples with CUDA

My card is RTX 2070super and I installed the 430.50 driver in ubuntu 18.04, then I installed the CUDA 10.0 through runfile, but when I compiled the samples, it didn’t work, please help…

"/usr/local/cuda-10.0"/bin/nvcc -ccbin g++ -I../../common/inc  -m64    -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_75,code=compute_75 -o deviceQuery.o -c deviceQuery.cpp
g++: No such file or directory
Makefile:288: recipe for target 'deviceQuery.o' failed
make: *** [deviceQuery.o] Error 1

what happens if you type

g++ --version

at a command prompt?

So sorry about missing that important error…