This is what it looks like on VS code terminal when I run the code.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS D:\C C++> cd "d:\C C++\" ; if ($?) { g++ TEST.C -o TEST } ; if ($?) { .\TEST }
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o): in function `main':
C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status
PS D:\C C++>
This is the simple program I tried to run.
#include<stdio.h>
int main(){
int age;
printf("Enter age\n");
scanf("%d",&age);
printf("age is %d",age);
return 0;
}