dear experts thank you for the reply,
here is the piece of code that i am trying to do
fpFile = fopen(filename,"rb");//here filename is "test.csv"
if (fpFile != NULL)
char buf[SizeValue];//here SizeValue is the size of the file for that i am using separat function to find out .
fread(buf, 1, SizeValue , fpFile);
getMstringVector(buf, '\n', *svect);//which converts from buffer to a vector svect
int scount = svect->getCount();//which gives nummber of lines
for(int i = 0; i < scount-1; ++i)
if((*svect)[i].indexOf('\r')) //which checks for control characters
getMstringVector((*svect)[i], ",", *tvect);//which converts each line based on delimeters(,) to a vector tvect
int tcount = tvect->getCount();
if( tcount > 0)
for(int j = 0; j < tcount; ++j)
tvect1 = (char*)(*tvect)[j];
char *str2 = strtok(tvect1, search_str);
int length = strlen(str2);
char *mystr = 0;
mystr = new Mbyte[length];
str2 = strtok(NULL, search_str);
like this the code follows this is the main snippet
so this works fine with the file with control characters but not for the file without control characters
please some suggestion.