int main(int argc, char *argv[]) { struct stat stat; void *fdm; if (argc != 1) return 1; if (fstat(STDIN_FILENO, &stat) == -1 || stat.st_size == 0) return 2; printf("1111"); } 怎么才能让程序输出1111 这是libmad的示例 有人说先要重定向到一个空文件 才能执行程序 是码?
by houtinghua - C/C++ - 2012-11-27 14:58:53 阅读(1358) 回复(1)
先发布源代码,再说明干什么用,免得烂在我的硬盘里。
[code]#!/usr/bin/env perl
# This program splits a wav file that contains multiple tracks into multiple wav
# files, each of which contains one track based on indices provided by a cue file.
# Written by Shufeng Tan