Click here to Skip to main content
15,914,444 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Urgent question: Char issues Pin
donno118-May-07 16:51
donno118-May-07 16:51 
GeneralRe: Urgent question: Char issues Pin
PJ Arends18-May-07 17:17
professionalPJ Arends18-May-07 17:17 
GeneralRe: Urgent question: Char issues Pin
donno118-May-07 17:30
donno118-May-07 17:30 
GeneralRe: Urgent question: Char issues Pin
donno118-May-07 21:31
donno118-May-07 21:31 
AnswerRe: Urgent question: Char issues Pin
normanS18-May-07 21:51
normanS18-May-07 21:51 
GeneralRe: Urgent question: Char issues Pin
donno118-May-07 22:46
donno118-May-07 22:46 
GeneralRe: Urgent question: Char issues Pin
normanS19-May-07 7:31
normanS19-May-07 7:31 
QuestionWrong code while reading a file i think :( [modified] Pin
Immunity1818-May-07 14:03
Immunity1818-May-07 14:03 
hello i work on code that open a file and try to find how many times there is a CString inside this file . (compare fuction work perfectly thanks to Whitesky and prasad Big Grin | :-D )

my problem everything work fine except while loop (when start the reading) and everything above this while (if i type str. it doesnt pop up menu of CString::member fuction
WArray and FArray already declarate before
and Compare (CString , CString) is that a problem ? because i give in this loop as 1 parameter a LPCSTR

CArray<cstring ,="" cstring=""> RArray;
CString FilePathName;
CString LineRead ;
CString str7;
int ntimes=0;
const int sz =100;
char buf[sz];
CString sl , slsl;
sl = "\\" ;

FilePathName = m_FolderName + FArray.GetAt(0);
m_List.AddString(FilePathName);
ifstream FileText(FilePathName);
while(FileText.get(buf,sz))
{
FileText.get();
LineRead = (LPCSTR) buf;

for ( int m = 0 ; m < WArray.GetSize() ; m++)
{
str7 = WArray.GetAt(m);
ntimes = ntimes + Compare(LineRead , str7);
}
}


FileText.close();
return;
CString str13;
str13.Format(_T("%d"),ntimes);
AfxMessageBox(str);



-- modified at 20:12 Friday 18th May, 2007
AnswerRe: Wrong code while reading a file i think :( Pin
Manoj Kumar Rai19-May-07 0:34
professionalManoj Kumar Rai19-May-07 0:34 
QuestionHow to solve this warning Pin
Jerry Burns18-May-07 9:23
Jerry Burns18-May-07 9:23 
QuestionRe: How to solve this warning Pin
David Crow18-May-07 10:19
David Crow18-May-07 10:19 
AnswerRe: How to solve this warning Pin
Jerry Burns18-May-07 10:55
Jerry Burns18-May-07 10:55 
GeneralRe: How to solve this warning Pin
David Crow21-May-07 2:27
David Crow21-May-07 2:27 
AnswerRe: How to solve this warning Pin
Manoj Kumar Rai19-May-07 0:37
professionalManoj Kumar Rai19-May-07 0:37 
QuestionDrawing titlebar on XP with themes Options Options Pin
maxus9918-May-07 7:20
maxus9918-May-07 7:20 
QuestionHow to convert from CString to integer? And Message Boxes Pin
Star0918-May-07 6:54
Star0918-May-07 6:54 
AnswerRe: How to convert from CString to integer? And Message Boxes Pin
Mark Salsbery18-May-07 7:35
Mark Salsbery18-May-07 7:35 
GeneralRe: How to convert from CString to integer? And Message Boxes Pin
Star0918-May-07 7:43
Star0918-May-07 7:43 
AnswerRe: How to convert from CString to integer? And Message Boxes Pin
Hamid_RT18-May-07 19:53
Hamid_RT18-May-07 19:53 
Questionsize of dialog in resource editor Pin
ldsdbomber18-May-07 5:24
ldsdbomber18-May-07 5:24 
AnswerRe: size of dialog in resource editor Pin
Larry J. Siddens18-May-07 5:29
Larry J. Siddens18-May-07 5:29 
GeneralRe: size of dialog in resource editor Pin
ldsdbomber18-May-07 5:31
ldsdbomber18-May-07 5:31 
GeneralRe: size of dialog in resource editor Pin
Larry J. Siddens18-May-07 5:33
Larry J. Siddens18-May-07 5:33 
AnswerRe: size of dialog in resource editor Pin
David Crow18-May-07 6:43
David Crow18-May-07 6:43 
QuestionUse object of an external class Pin
dodoxor18-May-07 5:12
dodoxor18-May-07 5:12 

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.