소개글
my effort
컴파일 실행환경
compile on gcc
unix system
change file extension to "cpp" from "txt"
just do it
본문내용
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX_STRING 1024
#define MAX__LEN 1024
char arr[MAX_STRING][MAX__LEN];
void quick_sort(int,int);
int part(int,int); // partition from pivot function
void main(int argc,char** argv){
FILE *fh;
int i=0;
int len_of_str;
char* buf = (char*)malloc(sizeof(char)*MAX__LEN);
if(argc<2){
fprintf(stderr,"usage: %s datafile \n",argv[0]);
exit(1);
}
if((fh = fopen(argv[1],"r")) == NULL){
fprintf(stderr,"file open error\n");
exit(1);
}
.....
압축파일 내 파일목록
qsort.txt
quick_sort.txt
selection_sort.txt
참고 자료
없음