Hi,
I want to print from a certain position and print to the end how do I do this?
memset(buf2, ' ', sizeof(buf2));
buf2[76] = NULL;
memcpy(buf2, cheque.sp_amount, sizeof(buf2));
ptr1 = strrchr(buf2, ' ');
*ptr1 = NULL;
ptr1++;
fprintf(fd, "%s --\r\n", buf2);
diff = sizeof(buf2) - strlen(ptr1);
here I want to take the cheque.sp_amount and start from position diff and print to the end of the line. I am having difficulty figuring this one out. Help would be appreciated. Thanks.
ptr = ;
fprintf(fd, "%s\r\n", ptr);
fprintf(fd, "%s\r\n", cheque.sp_amount);
memset(buf, '*', sizeof(buf));
buf[76] = NULL;
memcpy(buf, ptr1, strlen(ptr1));
POS(1.5);
fprintf(fd, "%s\r\n\r\n", buf);
I want to print from a certain position and print to the end how do I do this?
memset(buf2, ' ', sizeof(buf2));
buf2[76] = NULL;
memcpy(buf2, cheque.sp_amount, sizeof(buf2));
ptr1 = strrchr(buf2, ' ');
*ptr1 = NULL;
ptr1++;
fprintf(fd, "%s --\r\n", buf2);
diff = sizeof(buf2) - strlen(ptr1);
here I want to take the cheque.sp_amount and start from position diff and print to the end of the line. I am having difficulty figuring this one out. Help would be appreciated. Thanks.
ptr = ;
fprintf(fd, "%s\r\n", ptr);
fprintf(fd, "%s\r\n", cheque.sp_amount);
memset(buf, '*', sizeof(buf));
buf[76] = NULL;
memcpy(buf, ptr1, strlen(ptr1));
POS(1.5);
fprintf(fd, "%s\r\n\r\n", buf);