#include <io.h>
#include <stdio.h>
#include <iostream>
using namespace std;
int ReadStationID(char(*id)[50])
{
struct _finddata_t c_file;
long hFile;
char *p = NULL;
int i = 0;
/* Find first .c file in current directory */
if ((hFile = _findfirst("E:\\KJ_WORKDIR\\usr\\callsc_mtv\\zjcfgmn\\Station\\*.txt", &c_file)) == -1L)
{
printf("No *.txt files in current directory!\n");
return -1;
}
if (c_file.name)
sprintf(id[i++], "%s", strtok(c_file.name, "."));
while (_findnext(hFile, &c_file) == 0)
{
sprintf(id[i++], "%s", strtok(c_file.name, "."));
//printf(" %s\n", c_file.name);
}
_findclose(hFile);
return 0;
}
int main()
{
char id[50][50] = {0};
ReadStationID(id);
for(int i = 0; i< 50; i++)
{
cout << id[i] << endl;
}
}

最新文章

  1. Ubuntu 网络参数设置
  2. 掌握Thinkphp3.2.0----标签库
  3. 学习Jquery
  4. nginx源码分析—内存池结构ngx_pool_t及内存管理
  5. minhash
  6. web.xml filter 顺序
  7. awk 传入外部参数
  8. 在[self addsubView:xxx]中,self.name 和 _name的区别
  9. tomcat的webappclassloader中一个奇怪的异常信息
  10. js表白心形特效
  11. 安装mq的时候,计算机用户名是中文名的解决办法
  12. Values &amp; Reference:值和引用
  13. MATLAB 移动复制文件
  14. cgi,fast-cgi,php-cgi,php-fpm转载详解
  15. thinkphp生成的验证码提示因存在错误无法显示
  16. tms web core程序部署
  17. 【代码笔记】iOS-iphone开发之获取系统字体
  18. 【硬件】- 英特尔CPU命名规则
  19. emacs 中使用git diff命令行
  20. mybatis分享

热门文章

  1. C#编程 socket编程之unity聊天室
  2. DARTS代码分析(Pytorch)
  3. Leetcode之动态规划(DP)专题-392. 判断子序列(Is Subsequence)
  4. java-字符
  5. 基于vs插件的abp代码生成器
  6. LeetCode | DP专题详解
  7. 1 基于梯度的攻击——FGSM
  8. linux批量删除
  9. [转帖]RPM的原理及rpm命令常用参数
  10. SpringBoot自动化配置之四:@Conditional注解详解