这个很简单,问题就出现在atoi(argv[1])) < 1)这句上;原因是_TCHAR和CHAR的类型不一样;你要类型转换才可以;连接:http://blog.csdn.net/b_h_l/article/details/7581519 希望可以帮到你~