请教高手
#include<fstream.h>
#include<iostream.h>
#include<stdio.h>
void main(int arvc,char *argv[])
{ int sum,totalsum;
FILE *fp;
char ch;
if((fp=fopen(*++argv,"r"))==NULL)
{
printf("cannot open file\n");
return;
}
while(!feof(fp))
{
ch=fgetc(fp);
printf("\n");
while(ch!='\n'||ch!=EOF)
{
putchar(ch);
if(ch==' ')
{sum++;totalsum++;}
ch=fgetc(fp);
}
printf("\n");
printf("%d",sum);
}
printf("%d",totalsum);
fclose(fp);
}
请问高手们:这个程序我编译通不过.望指教.请问把它编译成可执行文件后怎么去运行.步骤怎样