I have encountered this problem. This is my code:
#include<stdio.h>
int main()
{
int x;
x=1.5+7%3*(int)(2.5+4.7)%2/4;
printf("%d",x);
getchar();
}
It's a simple c program. When I tried to compile the file, i found:
gcc.exe: error: main.c: No such file or directory
gcc.exe: fatal error: no input files
Is that related to settings in launch.json? My shell is powershell. Here is my launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "C/C++",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "D:\\MinGW\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
},
]
}
I am willing to learn.
Mod edit: removed off-topic question - see topics, point 4