C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 29th, 2017, 12:36 PM
Luftz Luftz is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2017
Posts: 1 Luftz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 15 sec
Reputation Power: 0
General - Find no the matching lines in the two texts

Hello. It is necessary to compare the two texts and found no the matching lines. The source texts are in two components RichEdit1,2 and divergent lines should be displayed in RichEdit3. I can not figure out how to get the result.
That piece of code, but it does not work as it should (displays all rows)

Code:
void __fastcall TForm1::BitBtn3Click(TObject *Sender)
{

const char* stroka1;
const char* stroka2;
RichEdit3-> Clear();
Memo1->Clear();
int i,j=0;
stroka1 = RichEdit1->Lines->Strings[i].c_str();
stroka2 = RichEdit2->Lines->Strings[j].c_str();
    for ( i=0; (i <RichEdit1->Lines->Count); i++)
      if (stricmp(stroka1,stroka2)!=0)
                {
                RichEdit3->Lines->Strings[i]=RichEdit2->Lines->Strings[j];
                RichEdit3->Lines->Add("\n");
                j++;
                }
                Memo1->Text=j;
}

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > General - Find no the matching lines in the two texts


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap