Hi I'm REALLY new at C and am getting this "constant out of range in comparison error". The line with the error is this:

printf("Would you like you enter additional sets of data? (yes/no)");
       scanf("%c", &answer);

   while( answer == 'yes');    <------ this line

I haven't done character strings in while loops so I didn't really know what to do.

Help please? :D

You have put single quotes round a series of 3 characters, 'yes'. However single quotes are used to delimit a single character 'a' '5' 'V' '*' '\t' (<--- it's a single tab character). If you want a string you need to use double quotes like this "yes", note that a string has a zero terminator so the length of the string "yes" is 4 bytes, one each for y, e and s and 1 for the zero terminator '\0'.

From line 2 of your code I am guessing that answer is in fact a char char answer; however if answer is an array char answer[100]; then you have your scanf on line 2 wrong and you can not compare strings (arrays of char) using ==.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.