0

No matter what i do i just can't get it to work.

ALL i want to do is take a LPCTSTR and a char* and concatenate them into a char*

myfunction(LPCTSTR pass, LPCTSTR fail, LPCTSTR done, char* table,char* db_file, int s_time){    
    char query2[200];
    strcpy(query2,"SELECT value FROM ");
    strcat(query2,table);
    strcat(query2," WHERE value = '");
    strcat(query2,(char*)pass);
    strcat(query2,"' OR value = '");
    strcat(query2,(char*)fail);
    strcat(query2,"'");
}

For the love of all that is holy why is this so hard.

ALSO NO, i can not just USE a string, cstring, stringstream or any other intermediate container. For some reason every time i try to use these i get a memory allocation error.

Chris Rice
  • 728
  • 2
  • 9
  • 32

0 Answers0