STUDENT RESPONSE ANI3-B
12-Mar-95 21:00:13
Sb: #158539-STUDENT RESPONSE ANI3-B
Fm: NAAUG 73204,3522
To: Jack S. Winberg 71513,1522
>>>Jerry>>>
Don't feel bad, this one escaped me too. And it's so obvious now. 🙂
I've noted up the declaration problems, the bad designators in the printf()
statements and in remarks suggested a course of action. Try it.
main()
{
char fname[]="Jack";
char lname[]="Winberg";
char say[]="What is your first name?";
char say2[]="What is your last name?";
int bsize=sizeof(fname); <—- this is an integer, right?
int bsize2=sizeof(lname); <— this is an integer, right? look below
Qstring(fname,bsize, say);
Qtext("Press to continue…");
Qstring(lname,bsize2,say2);
Qtext("Press to continue…");
printf("%s,%s",fname,bsize); <—- we have %s for an integer! ow!
Qtext("Press to continue…");
unprintf();
// the above should be:
// printf("%s is %d characters long.",fname,bsize);
// Qtext("Press to continue…");
// unprintf();
printf("%s,%s",lname,bsize2); <— we have %s for an integer! ow!
Qtext("Press to continue…");
unprintf();
// the above should be:
// printf("%s is %d characters long.",lname,bsize2)
// Qtext("Press to continue…");
// unprintf();
}
<<<Jerry<<<