Home > Back-end > How to use c language statistics all the TXT file in a folder sum total of the number of words
How to use c language statistics all the TXT file in a folder sum total of the number of words
Time:03-09
Ask bosses guide
How to use c language statistics all the TXT file in a folder sum total of the number of words
CodePudding user response:
Start -- opendir -- readdir (. TXT file, the processing, the. TXT, skip, directory, recursively,) - end
CodePudding user response:
Condition is very complex, folder may include folder, there may be multiple folders, need to deal with the recursive, perl/python with glob processing, if you must use the C language, you need to achieve glob and regular expression functions,
CodePudding user response:
The role of glob is to obtain the TXT file name; Regular expression is used to calculate words;