Whenever I try to run the code, it gives some error. How to resolve that?
EDIT After correcting ; it still shows this:
PS C:\Users\Dell\Desktop\C++> cd "c:\Users\Dell\Desktop\C++\" ; if ($?) { g++ test.cpp -o test } ; if ($?) { .\test }
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingw32.a(main.o):(.text.startup+0xc0): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status