I use Turbo C++.
Please can you compile and put right this program.
Not sure if it's me or my compiler thanks.
#include <stdio.h>
int main(int count, char *strings[]) {
char *p1, *p2;
int i = 0;
if(count != 3) {
printf("Usage: alpha <start char> <end char>\n");
exit(-1);
}
if(*strings[1] < 65 || *strings[1] > 90 || *strings[2] < 65
|| *strings[2] > 90 || *strings[2] < *strings[1]) {
printf("Please input uppercase characters from A-Z, with the ");
printf("second one coming after the first one alphabetically.");
printf("\n");
exit(-1);
}
p1 = (char *)malloc(1);
p2 = (char *)malloc(1);
memcpy(p1, strings[1], sizeof(char));
memcpy(p2, strings[2], sizeof(char));
while((*p1 + i) <= *p2){
printf("%c", (*p1 + i));
i++;
}
printf("\n");
}