Help me! problem "if"

Hello, I am a beginner and I have a problem in my code. It compiles but I is not the expected result. the condition does not. You have a solution?
Sorry if there are mistakes, I'm french and I translated with google.
int x;
ofstream oFile ("log.txt", ios::out | ios::app);

HWND myHandle,saveHandle;
char myText[300];
wchar_t str[50];    

if(saveHandle != myHandle) {
              time_t now = time(NULL);
       struct tm * tm = localtime(&now);

       char date[64];
       strftime(date, sizeof date, "%A, %B %d, %Y %H:%M:%S", tm);
       oFile << "\n";
       oFile << "\n";
       oFile << date << ":" << endl;

::GetWindowTextA(myHandle,myText,sizeof myText);
oFile << myText << endl;
oFile << "\n";
saveHandle = myHandle;
HANDLE clip,saveclip;
    if (OpenClipboard(NULL)) {
      clip = GetClipboardData(CF_TEXT);
  HERE-->    if(saveclip != clip) {
    string text;
    text = (char*)clip;
    oFile << text << endl;
    saveclip = clip;}

Thank you !
Last edited on
Topic archived. No new replies allowed.