I am reading data from a device at comm port using ReadFile() function in C Programming and i saved it into array, Data i received is in chunks now i want to break it into lines or read it line by line, kindly help me in code to read data line by line or is there any solution like first save data into an array then read array line by line..
What I have tried:
char data[50];
ReadFile(hComm, &data, sizeof(data), &noofbytesread,NULL);
printf("%s", data);