Hello, the following is generating a error at the line "tmprintf(&tmBundle, _TMC("{0}"),Prompt);"... a bit lost as I am diving into this debug...
Thank you in advance...
int H_YesNo(TMCHAR *Prompt, int DefVal)
{
TMCHAR YesNo = '\0';
tmprintf(&tmBundle, _TMC("{0}"),Prompt);
while (!tmstrchr(_TMC("NY"),(YesNo = toupper(*tmgets(&YesNo)))))
{
tmprintf(&tmBundle, _TMC("Must enter a Y or N. Please reenter.\n"));
tmprintf(&tmBundle, _TMC("{0}"),Prompt);
YesNo = '\0';
}
return ((YesNo == 'Y') || ((YesNo == '\0') && (DefVal)));
}
Which error?
The problem may reside i the _TMC macro, which we do not see code for. Or not, depending on the exact error.
I am receiving the error
HGetInput.c: In function `H_YesNo':
HGetInput.c:43: error: syntax error before ';' token
HGetInput.c:43: error: syntax error before ')' token
at line "tmprintf(&tmBundle, _TMC("{0}"),Prompt);"
Other function call are using _TMC with no issues... and I have played with this quite a bit but no luck.
thank you in advance..
-j
It may be having problems with your while statement. Which I really don't like the look of anyhow; its so code-packed it took me a while to notice you're assigning YesNo twice in that one statement.