warn « pointer « C File Q&A

Home
C File Q&A
1.array
2.binary
3.delete
4.Development
5.directory
6.fgets
7.fopen
8.fprintf
9.fscanf
10.fwrite
11.header
12.include
13.input
14.LINE
15.linux
16.open
17.output
18.pointer
19.read
20.size
21.string
22.struct
23.Text
24.windows
25.write
C File Q&A » pointer » warn 

1. warning to pass argument 1 of ‘fopen’ from incompatible pointer type    stackoverflow.com

My program takes two files with words sorted as parameter and performs the mixture into 1 single file called final_sorted.txt.the program runs successfully and creates the mixed file, even ignoring repeated ...

2. warning: passing argument 1 of 'fgets' from incompatible pointer type    cboard.cprogramming.com

Code: #include #include #define MAX_CHAR 132 #define MAX_SIZE 65536 FILE *file; int main(void) { file = fopen("words", "r"); char ch; char string[MAX_CHAR]; char temp[MAX_CHAR]; char words[MAX_SIZE][MAX_CHAR]; register int counter = 0, number = 0, a = 0; srand(time(NULL)); while ( fgets(&string, MAX_CHAR+1, file) != NULL ) { a=0; while ( string[a++] != '\n' ); string[a-1] = 0; strcpy(words[counter++], string); ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.