So, first of all, could someone give me a very short tutorial how to program C in Visual Studio 2010?
I have this code, a direct copy from a book:
Code:#include <stdio.h> int main(void) { printf("\n**************"); /* Draw the top of the box */ for(int count = 1; count <= 8; ++count) { printf("\n* *"); /* Draw the sides of the box */ } printf("\n**************\n"); /* Draw the bottom of the box */ return 0; }
I try to build it:
Error 1 error C2143: syntax error : missing ';' before 'type'
Error 2 error C2143: syntax error : missing ';' before 'type'
Error 3 error C2143: syntax error : missing ')' before 'type'
Error 4 error C2143: syntax error : missing ';' before 'type'
Error 5 error C2065: 'count' : undeclared identifier
Warning 6 warning C4552: '<=' : operator has no effect; expected operator with side-effect
Error 7 error C2059: syntax error : ')'
Error 8 error C2065: 'count' : undeclared identifier
Error 9 error C2146: syntax error : missing ';' before identifier 'printf'
What do I do wrong?