Click here to Skip to main content
16,017,235 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Hi all Pin
Paresh Chitte17-May-07 0:07
Paresh Chitte17-May-07 0:07 
GeneralRe: Hi all Pin
josip cagalj17-May-07 0:32
josip cagalj17-May-07 0:32 
GeneralRe: Hi all Pin
Paresh Chitte17-May-07 0:41
Paresh Chitte17-May-07 0:41 
AnswerRe: Hi all Pin
josip cagalj17-May-07 0:59
josip cagalj17-May-07 0:59 
GeneralRe: Hi all Pin
Mark Salsbery17-May-07 5:53
Mark Salsbery17-May-07 5:53 
QuestionRe: Hi all Pin
Hamid_RT17-May-07 6:47
Hamid_RT17-May-07 6:47 
AnswerLast msg Pin
josip cagalj17-May-07 22:02
josip cagalj17-May-07 22:02 
QuestionProblem with code on Reading Files :( Pin
Immunity1816-May-07 22:32
Immunity1816-May-07 22:32 
Hi i am working on a project where it is reading files (names are stored on a CArray[CS ,CS] FArray ). CS = CString and [ = < ] = >

While it Reading a file :

In each Buffer line it search if there is any word (stored in a CArray[CS,CS] WArray) int ntimes is the number that each WArray element found in Buffer Line

and the end each ntimes is stored in RArray.

Code is working perfect till ifstream TextFile
when i am adding the next code lines the .exe i build is freezing and
become (Not Responding)

if someone could see the reading code for some faults i would greatful


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

m_FolderName = "C:\\test123\\";
for ( int p = 0 ; p < FArray.GetSize() ; p++)
{
FilePathName = m_FolderName + FArray.GetAt(p);
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++)
{
int nStart=1;
while ( LineRead.Find(WArray.GetAt(m),nStart)!=0)
{
ntimes = ntimes +1;
nStart= LineRead.Find(WArray.GetAt(m) , nStart);
}

RArray.Add(""+ntimes);

}
}

FileText.close();
return;


}
AnswerRe: Problem with code on Reading Files :( Pin
Hamid_RT16-May-07 22:37
Hamid_RT16-May-07 22:37 
GeneralRe: Problem with code on Reading Files :( Pin
Immunity1816-May-07 22:41
Immunity1816-May-07 22:41 
Questionslow scrollbar Pin
Aint16-May-07 22:13
Aint16-May-07 22:13 
AnswerRe: slow scrollbar Pin
Mark Salsbery17-May-07 5:56
Mark Salsbery17-May-07 5:56 
AnswerRe: slow scrollbar Pin
Nelek17-May-07 20:15
protectorNelek17-May-07 20:15 
QuestionImages in CListCtrl Pin
anilkrupakar16-May-07 21:58
anilkrupakar16-May-07 21:58 
AnswerRe: Images in CListCtrl Pin
CPallini16-May-07 22:12
mveCPallini16-May-07 22:12 
AnswerRe: Images in CListCtrl Pin
Hamid_RT16-May-07 22:24
Hamid_RT16-May-07 22:24 
QuestionBoost 1.34.0 have been released! Pin
Shao Voon Wong16-May-07 21:54
mvaShao Voon Wong16-May-07 21:54 
AnswerRe: Boost 1.34.0 have been released! Pin
Sarath C16-May-07 22:33
Sarath C16-May-07 22:33 
AnswerRe: Boost 1.34.0 have been released! Pin
toxcct17-May-07 0:28
toxcct17-May-07 0:28 
QuestionHelp me Creating a Setup.exe Pin
garfield18516-May-07 21:29
garfield18516-May-07 21:29 
AnswerRe: Help me Creating a Setup.exe Pin
Hamid_RT16-May-07 22:32
Hamid_RT16-May-07 22:32 
GeneralRe: Help me Creating a Setup.exe Pin
garfield18516-May-07 22:42
garfield18516-May-07 22:42 
GeneralRe: Help me Creating a Setup.exe Pin
Hamid_RT16-May-07 22:50
Hamid_RT16-May-07 22:50 
GeneralHelp me Creating a Setup.exe Pin
garfield18517-May-07 0:31
garfield18517-May-07 0:31 
AnswerRe: Help me Creating a Setup.exe Pin
Hans Dietrich17-May-07 0:22
mentorHans Dietrich17-May-07 0:22 

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.