div24ever's blog

By div24ever, history, 5 years ago, In English

I want to know how can i compare two different outputs so that i can check whether an algorithm works fine for corner cases also. I want to compare output generated by naive algorithm and an another algorithm saved in two .txt files. I use Code Blocks.

 
 
 
 
  • Vote: I like it
  • +1
  • Vote: I do not like it

»
5 years ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

Windows — system("fc first.txt second.txt")
Linux — system("diff first.txt second.txt")

  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I am getting this error. 'FC' is not recognized as an internal or external command, operable program or batch file.

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I use Notepad++ on Windows

Click on plugins->plugin manager->show plugin manager->select Compare->Install

To use it you can manaully select it from plugins or just press Alt+D

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it