Reputation: 65
I am using Vsc to write my program in C, the program should return an error but nothing is shown, only the final code is provided (code = 3221225477), how can I get the error displayed?
The final output is: [Done] exited with code=3221225477 in 0.569 seconds
#include <stdio.h>
#include <stdlib.h>
int main(){
char x = 'a';
printf("%s", x); //Error cause i'm using %s for a char
}
P.s. I have already installed .Run and the C / C ++ extension
Upvotes: 0
Views: 155
Reputation: 63264
The Microsoft C/C++ extension if configured properly (
problemMatcher
intasks.json
) should also trigger similar errors based on the compiler you select.
After investigation, you might get some help from the clangd extension.
main.c
).Then this extension should run clangd in the background and show a warning "Format specifies type 'char *' but the argument has type 'char' (fix available)".
Upvotes: 1