|
![]() |
#1 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2005
Location: ,
Posts: 454
|
![]() So I'm solving one problem from internet and when I post my code to verify it I get a mistake in output. But everything would be nice if the output wasn't 10 (A4) pages long.
I have the correct output and my one. By looking at them they are indentical. Now I ask you "fighters of abandonia" for help. I need to find (probably) one line of output that is different from te correct one. Help me! Anything could help me. ... On the other hand I could write a program. muck... ...I think I will write a program... Anyway thanks. Still it would be great to have some program that can tell the difference between documents. :blink: No need now for this topic. LOL
__________________
Never mess with me when I have a cougar, Never! |
||
![]() ![]() |
|
![]() |
#2 | ||
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2004
Location: Jan Mayen, Svalbard and Jan Mayen
Posts: 2,167
|
![]() try diff
it's an application to compare files
__________________
Flowing with the stream of life |
||
![]() ![]() |
|
![]() |
#3 | ||
![]() ![]() ![]() ![]() ![]() ![]() |
![]() Here ya go - it's quick and nasty though!
#include <iostream> #include <fstream> using namespace std; int main() { string filename1,filename2; cout<<"File one: "; cin>>filename1; ifstream inone(filename1.c_str()); cout<<"File two: "; cin>>filename2; ifstream intwo(filename2.c_str()); string a,b; int n = 0; while ((!inone.eof()) && (!intwo.eof())) { getline(inone,a); getline(intwo,B); n++; if (a != B) { cout<<"There was a discongruity on line: "<<n<<"\n"; } } return 0; } Edit: Ugh... lost all my formatting... Edit2: Ugh... it turned my code into smileys! |
||
![]() ![]() |
|
![]() |
#4 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2005
Location: ,
Posts: 454
|
![]() Quote:
It looks very much like yours. Anyway thanks again. BTW: Kon-tiki, you can delete this topic becouse it's stupid, and there is no use of it . I was very stupid to start this topic when I did my own "difference" program ten minutes later.
__________________
Never mess with me when I have a cougar, Never! |
||
![]() ![]() |
|
![]() |
#5 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2005
Location: ,
Posts: 454
|
![]() @Jim6
Have seen your signature link, nice story. LOL
__________________
Never mess with me when I have a cougar, Never! |
||
![]() ![]() |
|
![]() |
#6 | ||
![]() ![]() ![]() ![]() ![]() ![]() |
![]() Well, whatever - I just made it because I was bored.
Also, yeah - I thought it was really good - if a bit weird! |
||
![]() ![]() |
|
![]() |
#7 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2005
Location: ,
Posts: 454
|
![]() Quote:
__________________
Never mess with me when I have a cougar, Never! |
||
![]() ![]() |
|