求各位大神帮小妹看看这个程序问题出在哪儿
用vs2013编程的,程序如下#include<stdio.h>
#include <string.h>
#define INPUTPATH "/Users/damotou/Desktop/1.txt" //这里填写输入文本的路径
#define OUTPUTPATH "/Users/damotou/Desktop/2.txt" //这里填写输出文件的路径
#define FILE_NAME_MAX_SIZE 512
#define BUFFER_SIZE 1024
int main(int argc, char **argv) {
char** pbuffer = NULL;
char inputfile_name[FILE_NAME_MAX_SIZE + 1];
char outputfine_name[FILE_NAME_MAX_SIZE + 1];
int numberline = 0;
int randomnum = 0;
int randvalue[50];
srand((unsigned int)(time(NULL))); //利用时间产生不同的随机数种子
bzero(inputfile_name, FILE_NAME_MAX_SIZE + 1);
bzero(outputfine_name, FILE_NAME_MAX_SIZE + 1);
strncpy(inputfile_name, INPUTPATH,
strlen(INPUTPATH) > FILE_NAME_MAX_SIZE ? FILE_NAME_MAX_SIZE : strlen(INPUTPATH));
strncpy(outputfine_name, OUTPUTPATH,
strlen(OUTPUTPATH) > FILE_NAME_MAX_SIZE ? FILE_NAME_MAX_SIZE : strlen(OUTPUTPATH));
FILE * infp = fopen(inputfile_name, "r");
FILE * outfp = fopen(outputfine_name, "w+");
if (NULL == infp) {
printf("File:\t%s Not Found\n", inputfile_name);
}
if (NULL == outfp) {
printf("File:\t%s Not Found\n", outputfine_name);
}
pbuffer = (char**) calloc(BUFFER_SIZE, sizeof(char*));
while (!feof(infp)) {
pbuffer[numberline] = (char *) malloc(BUFFER_SIZE * sizeof(char));
fgets(pbuffer[numberline], BUFFER_SIZE, infp); //读取一行
numberline++;
}
for (randomnum = 0; randomnum < 50; randomnum++) {
int temprand = 0;
lab: randvalue[randomnum] = rand() % 100;
for (temprand = 0; temprand < randomnum; temprand++) {
if (randvalue[randomnum] == randvalue[temprand])
goto lab;
}
}
for (randomnum = 0; randomnum < 50; randomnum++) {
fwrite(pbuffer[randvalue[randomnum]], sizeof(char), BUFFER_SIZE, outfp);
}
for (randomnum = 0; randomnum < 25; randomnum++) {
int temprand = 0;
lab_1: randvalue[randomnum] = rand() % (201 - 100) + 100;
for (temprand = 0; temprand < randomnum; temprand++) {
if (randvalue[randomnum] == randvalue[temprand])
goto lab_1;
}
}
for (randomnum = 0; randomnum < 25; randomnum++) {
fwrite(pbuffer[randvalue[randomnum]], sizeof(char), BUFFER_SIZE, outfp);
}
for (randomnum = 0; randomnum < 25; randomnum++) {
int temprand = 0;
lab_2: randvalue[randomnum] = rand() % (301 - 200) + 200;
for (temprand = 0; temprand < randomnum; temprand++) {
if (randvalue[randomnum] == randvalue[temprand])
goto lab_2;
}
}
for (randomnum = 0; randomnum < 25; randomnum++) {
fwrite(pbuffer[randvalue[randomnum]], sizeof(char), BUFFER_SIZE, outfp);
}
for (randomnum = 0; randomnum < numberline; randomnum++) {
free(pbuffer[randomnum]);
}
free(pbuffer);
fclose(infp);
fclose(outfp);
}
错误命令如下
错误 12 error LNK2019: 无法解析的外部符号 __bzero,该符号在函数 _main 中被引用 d:\documents\visual studio 2013\Projects\ConsoleApplication2\ConsoleApplication2\源.obj ConsoleApplication2
错误 13 error LNK1120: 1 个无法解析的外部命令 d:\documents\visual studio 2013\Projects\ConsoleApplication2\Debug\ConsoleApplication2.exe 1 1 ConsoleApplication2
请问怎么修改呢?