I'm using windows 10 ming g++ compiler. When I was using macOS for compile and run at the same time I use the command.
g++ name.cpp && ./a.out
It worked but when I tried to use this in windows
g++ name.cpp && ./exe
it didn't work it shows an error message (The token '&&' is not a valid statement separator in this version).
So i use g++ name.cpp
./a.exe
but i want to run in a single line command.