帮忙改一下错误,谢谢
#include<iostream>#include<cstring>
#include<cstdlib>
#include<cstdio>
using namespace std;
int play(void){
system("cls");
printf("playing sound\a\a\a\a\a\a\n");
return 0;
}
int file(){
string a;
scanf("%s",&a);
FILE *fp;
fp=fopen("1.txt","r+");
//fprintf(fp,"%d",a);/*出现错误 [Error] cannot convert 'const char*' to 'FILE* {aka _iobuf*}' for argument '1' to 'int fprintf(FILE*, const char*, ...)'*/
fclose(fp);
return 0;
}
int main(void){
file();
play();
return 0;
}