Hi,
Is there a step by step guide on how to compile and run a simple program like :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
#include <stdio.h>
int main()
{
FILE * pFile;
char buffer [100];
pFile = fopen ("myfile.txt" , "r");
if (pFile == NULL) perror ("Error opening file");
else
{
while ( ! feof (pFile) )
{
fgets (buffer , 100 , pFile);
fputs (buffer , stdout);
}
fclose (pFile);
}
return 0;
}
|
using Microsoft Visual Studio 2008 Express Edition
Thanks,
-Kamal.
Last edited on
The easiest thing to do would be to start Visual C++ express.
Go to the Help menu and select How Do I.
Then go from there, you will probable want to go for the fist link [Getting Started] and from there look for Creating a Standard C++ Program.
HTH
in addition to what Grey Wolf said u can also load up visual studio and at the start page on the IDE scroll down and goto the Getting Started section.