Home > Software engineering >  MFC after read TXT file line by line in how to determine which is the same as the existing string, a
MFC after read TXT file line by line in how to determine which is the same as the existing string, a

Time:10-05

MFC after read TXT file line by line in how to determine which is the same as the existing string, and the ministry branch line to write different dialog?

CodePudding user response:

CFile: : Read () a Read buffer, such as the last deposit cstrings type of object, and then using cstrings: : Tokenize () to \ r \ n as a delimiter split string lines of text information, and then use CFile: : Find () function finds contains the specified substring,

CodePudding user response:

CString str;//save have read the words in each row
Cstrings temp.//need to determine whether have the same characters, for example, the string is "123"
If (STR), Find (temp)==1)
{
//is proved that no 123 in the STR string
}
The else
//is proved that existence and 123 the same string

CodePudding user response:

Respond to the great god can help me to write the code... A novice in some places really don't understand the
And find the same string after how to choose the line output to edit box

CodePudding user response:

The building Lord solved yet? I am also the same problem

CodePudding user response:

Reference notepad + + source code fragments of related?
  • Related