I'm converting a exe to a dll. I need to capture the errors
and display them at the end of the program instead of displaying the error as it happens (the way it works now).
I set up a variable named warning list:
I replaced the spots where the program would display errorsCode:WarningList[255];
with the following code (Note - the old code would display variables of different types:
Old Code/
New Code/Code:cout<<"A"; scrn<<"NOTE: The bond between atoms "<<papa[q[j]]<<" and "<<q[j]<<" is not in an aromatic ring.\n"; scrn<<"It will be interpreted as a single bond.\n";
The problem I'm running into is including variables that are integers in my WarningList. Here's the specific error:Code:if (strlen(WarningList) > 1) { strcat(WarningList,","); } strcat(WarningList,"The bond between atoms "); strcat(WarningList,papa[q[j]]); strcat(WarningList,"and "); strcat(WarningList,q[j]); strcat(WarningList," is not in an aromatic ring. It will be interpreted as a single bond.");
C:\MSDEV\Projects\cfx_SmilesParser\request.cpp(452 ) : error C2664: 'strcat' : cannot convert parameter 2 from 'int' to 'const char *' (new behavior; please see help)
I'm new to C++ and have been having a hard time figuring out how to get this to work. Any advice would be greatly appreciated.



LinkBack URL
About LinkBacks



I used to be an adventurer like you... then I took an arrow to the knee.