I wanted to learn C, so I decided to start a C project and try out the canonical “Hello, world!” program in Visual Studio.
So I put this code in
#import <stdio.h>
main()
{
printf("Hello, world!");
}
and got three errors:
IntelliSense: cannot open source file “C:/…/stdio.tlh”
IntelliSense: identifier “printf” is undefined
IntelliSense: PCH warning: cannot find a suitable header stop location. An intellisense
PCH file was not generated.
Apparently I’m setting up my project wrong or I don’t have the header files I need or something like that.
I’m sure this seems like a really basic problem, but I haven’t really used C before so I’m stuck and don’t know what to do. What am I doing wrong and how do I fix it?
It’s not
#import, it’s#include.