Click here to Skip to main content
15,890,670 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRegarding Back ground color. Pin
Neelesh K J Jain13-Sep-05 3:17
Neelesh K J Jain13-Sep-05 3:17 
AnswerRe: Regarding Back ground color. Pin
Cedric Moonen13-Sep-05 3:22
Cedric Moonen13-Sep-05 3:22 
AnswerRe: Regarding Back ground color. Pin
John R. Shaw13-Sep-05 4:32
John R. Shaw13-Sep-05 4:32 
QuestionUsing Scrollbars in CustomControl Pin
AnTri13-Sep-05 3:15
AnTri13-Sep-05 3:15 
QuestionCompare txt files Pin
densitet13-Sep-05 2:34
densitet13-Sep-05 2:34 
AnswerRe: Compare txt files Pin
Cedric Moonen13-Sep-05 3:01
Cedric Moonen13-Sep-05 3:01 
GeneralRe: Compare txt files Pin
densitet13-Sep-05 3:23
densitet13-Sep-05 3:23 
AnswerRe: Compare txt files Pin
David Crow13-Sep-05 4:20
David Crow13-Sep-05 4:20 
densitet wrote:
std::ifstream database ("C:\Documents and Settings\Densitet\My Documents\Visual Studio Projects\IOCP-SRC\IOCP-SRC\IOCP\Debug\USBDevices.txt");

This won't work with single backslahes in a string literal.

Cedric has already given you a solution, but I have question. Since this is an MFC application, why are you using char instead of CString? By changing data and data2 to CString, you can then do the more natural if (data == data2) comparison.

Also, for each line that you are reading from the fileusb object, you are looking for that line in the database object. That works fine for the first pass through the database object but I don't see where that object gets reset so that it can be searched again for the next line in the fileusb object.


"One must learn from the bite of the fire to leave it alone." - Native American Proverb


GeneralRe: Compare txt files Pin
densitet13-Sep-05 4:49
densitet13-Sep-05 4:49 
GeneralRe: Compare txt files Pin
David Crow13-Sep-05 5:56
David Crow13-Sep-05 5:56 
GeneralRe: Compare txt files Pin
gamitech13-Sep-05 9:35
gamitech13-Sep-05 9:35 
GeneralRe: Compare txt files Pin
David Crow13-Sep-05 10:25
David Crow13-Sep-05 10:25 
GeneralRe: Compare txt files Pin
gamitech13-Sep-05 10:56
gamitech13-Sep-05 10:56 
GeneralRe: Compare txt files Pin
David Crow13-Sep-05 11:09
David Crow13-Sep-05 11:09 
GeneralRe: Compare txt files Pin
densitet13-Sep-05 22:11
densitet13-Sep-05 22:11 
GeneralRe: Compare txt files Pin
densitet13-Sep-05 22:12
densitet13-Sep-05 22:12 
GeneralRe: Compare txt files Pin
gamitech13-Sep-05 9:53
gamitech13-Sep-05 9:53 
GeneralRe: Compare txt files Pin
bugDanny13-Sep-05 11:25
bugDanny13-Sep-05 11:25 
GeneralRe: Compare txt files Pin
densitet14-Sep-05 0:11
densitet14-Sep-05 0:11 
GeneralRe: Compare txt files Pin
David Crow14-Sep-05 2:36
David Crow14-Sep-05 2:36 
GeneralRe: Compare txt files Pin
densitet14-Sep-05 4:38
densitet14-Sep-05 4:38 
GeneralRe: Compare txt files Pin
David Crow14-Sep-05 5:54
David Crow14-Sep-05 5:54 
GeneralRe: Compare txt files Pin
bugDanny14-Sep-05 11:04
bugDanny14-Sep-05 11:04 
GeneralRe: Compare txt files Pin
David Crow14-Sep-05 11:06
David Crow14-Sep-05 11:06 
GeneralRe: Compare txt files Pin
bugDanny15-Sep-05 6:44
bugDanny15-Sep-05 6:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.