|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
How can i ckeck the no of iems of a input file
if i if i wanna write a program that sort an absolute maximum of 5000 items, print error message if more than 5000 in that file. how can i read that file and check its item....
|
|
#2
|
|||
|
|||
|
int count = 0;
while(!inFile.eof()) { inFile>>data; count++; } |
|
#3
|
||||
|
||||
|
Are these items of fixed length? If so, then a quick-and-dirty way would be to get the file length and divide it by that fixed length to get the number of items.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > How can i ckeck the no of iems of a input file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|