visual c++ - Error LNK1169, Help!! I'm a beginner -
i given code error , fix it. don't know why can't run it. keeps saying "fatal error lnk1169: 1 or more multiply defined symbols found"
this original code have fix.
int value1, int value2, int value3 ; file outptr; outptr=fopen(“myfile.txt”, ‘w’); if(outptr) { printf(outptr, “ %f %f %f” , value1, value2, value3) }; fclose(outptr); else { fprintf(“the file myfile.txt not available”); }
and came with
#include<stdio.h> int main(void) { int value1, value2, value3; file *outptr; outptr = fopen("myfile.txt", "w"); if(outptr) { printf("please put in values value1,value2,value3\n"); scanf("%d%d%d",&value1, &value2, &value3); fprintf(outptr, "%d %d %d", value1, value2, value3); fclose(outptr); } else { printf("the file not available"); } }
but keep getting error lnk1169. please me.
this sounds problem project have repeated function same name (possibly multiple main()s). when compiling compiler finding repeated function , complaining have declared twice. try removing code , placing separate new project , may find passes in isolation.
edit: found error definition confirms suspicion.
Comments
Post a Comment