My input file consists of 100 lines of ascii text which should be sorted. I have defined my textBuffer as an array of 100 strings and everywhere, loops and etc., its 100. So its not a magic number....
Type: Posts; User: ramtinraji
My input file consists of 100 lines of ascii text which should be sorted. I have defined my textBuffer as an array of 100 strings and everywhere, loops and etc., its 100. So its not a magic number....
Thank you very much guys. I solved the problem. You are right Quzah, I just put constant 100 (as in 100 strings) instead of stringlen and it worked!! :D
Thanks again Salem and Quzah. GoodDay :)
Thank you; So what should I do? Hoever I've seen qsort usage on such an array which is fine. so what do you think? Even when I try to qsort it using constants, I encounter Segmentation fault error :...
Hi everybody,
I'm writing a simple program which is declaring an array of strings and allocating some space using malloc(). Then, Im gonna sort it using qsort(), so i need the size of my array,...