,   CyberForum.ru

: initializing argument 2 of `char* fgets(char*, int, FILE*) - C++

 
owan
   owan
11 / 11 / 9
: 07.11.2011
: 48
19.04.2012, 20:41     : initializing argument 2 of `char* fgets(char*, int, FILE*) #1
, ,

18 (initializing argument 2 of `char* fgets(char*, int, FILE*))'
C++ (Qt)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include<conio.h>
#include<stdio.h>
#include<string.h>
#include <ctype.h>
 main()
{
 FILE *fp;
 int i,n,j,flag;
 char c[256];
 char *f;
// clrscr();
 fp=fopen("t.txt","r");
 if (fp==NULL)
        {
         puts(" error ");
         return 0;
        }
while(fgets(f,c,fp)) // ÷èò*åì âñå ñòðîêè äî êî*ö* ô*éë*
{
flag = 0; // ôë*ã **ëè÷èÿ äâóç**÷*îãî ÷èñë*
n = strlen(f); // ïîëó÷*åì äëè*ó ñòðîêè
if(n >= 2) // åñëè äëè** ñòðîêè áîëüøå èëè ð*â*î 2
{
for(i=0; i<n; i++) // ïðîõîäèì ïî âñåé ñòðîêå
{
// óñò***âëèâ*åì ç**÷å*èå ôë*ã* ïðèñóòñòâèÿ äâóç**÷*îãî ÷èñë*
flag = isdigit(f[i]) // òåêóùèé ñèìâîë - öèôð*
& isdigit(f[i+1]); // è ñëåäóþùèé ç* *èì ñèìâîë - öèôð*
if(f) // åñëè åñòü äâóõç**÷*îå ÷èñëî
puts(f);  // âûõîäèì èç öèêë*
}
if(!f) break;// åñëè äâóç**÷*îãî ÷èñë* â ñòðîêå *åò
 // âûâîäèì ñòðîêó â êî*ñîëü
}
}
fclose(fp); // ç*êðûâ*åì ô*éë
return 0; // âûõîäèì
}
Similar
41792 / 34177 / 6122
: 12.04.2006
: 57,940
19.04.2012, 20:41     : initializing argument 2 of `char* fgets(char*, int, FILE*)
:

char int ( ?????) C++
C++ unsigned char char, int
C++ char* int int char*?
C++ cannot convert char * to char (
error C2446: '==' : no conversion from 'const char *' to 'int' C++
(char)int (char*)int C++
invalid conversion from 'const char*' to 'char*' C++
error: cannot convert int (*)[5] to int** for argument 1 to void Replase(int**)' C++



:
.
Heretiqu3
10 / 10 / 2
: 19.04.2012
: 20
19.04.2012, 21:58     : initializing argument 2 of `char* fgets(char*, int, FILE*) #2
owan
(initializing argument 2 of `char* fgets(char*, int, FILE*))'
, ,
, - c[256].
owan
   owan
11 / 11 / 9
: 07.11.2011
: 48
19.04.2012, 22:11  []     : initializing argument 2 of `char* fgets(char*, int, FILE*) #3
Yandex
19.04.2012, 22:11     : initializing argument 2 of `char* fgets(char*, int, FILE*)

: 07:49. GMT +3.
- , ,
-
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
@Mail.ru