so I am trying to run a C program for the first time using VS and Mac OS Catalina however I get the following error messages when trying to run:
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/Users/xxx/Documents/EECS2031/scanf2.c).C/C++(1696)
cannot open source file "stdio.h"C/C++(1696)
I'm using the 'Code Runner' extension in VS to run the C code and I have also installed the following things using homebrew:
xcode-select --install
brew install gcc
I'm not sure what else to do as I am completely new to C, and haven't found any other solutions after searching so I need some help. The c filename has a .c extension as well if that helps.
Here is the C code:
#include <stdio.h>
/*The error is here when I am trying to include this library*/
int sum (int i, int j)
{
return i+j;
}
main()
{
int a, b;
printf("Please enter two integers separated by a blank: " );
scanf( "%d %d", &a, &b); /* assign value to a b */
printf("Entered %d and %d. Sum is %d\n", a, b, sum(a,b));
return 0;
}