Click here to Skip to main content
15,860,859 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: TCP/API class basic design Pin
Albert Holguin10-Nov-14 4:58
professionalAlbert Holguin10-Nov-14 4:58 
GeneralRe: TCP/API class basic design Pin
bkelly1310-Nov-14 12:40
bkelly1310-Nov-14 12:40 
AnswerRe: TCP/API class basic design Pin
Albert Holguin10-Nov-14 16:47
professionalAlbert Holguin10-Nov-14 16:47 
GeneralMultiple threads explained Pin
bkelly1311-Nov-14 6:30
bkelly1311-Nov-14 6:30 
GeneralRe: Multiple threads explained Pin
Albert Holguin11-Nov-14 7:01
professionalAlbert Holguin11-Nov-14 7:01 
GeneralRe: Multiple threads explained Pin
bkelly1311-Nov-14 9:58
bkelly1311-Nov-14 9:58 
AnswerRe: TCP/API class basic design Pin
pasztorpisti10-Jan-15 11:06
pasztorpisti10-Jan-15 11:06 
QuestionTime of reading text file Pin
econy7-Nov-14 4:24
econy7-Nov-14 4:24 
Hi, I wrote a program in Windows CE platform, CPU is ARM 427MHZ.
when program read a text file(size about 700KB,1000 lines) in Flash memory, it needs about 25 seconds to load the file.

is there a means to decrease the reading time?

C++
file.Open(fileName,CFile::typeBinary | CFile::modeRead);
while ( UNReadString(&file,strLine) ) {
		//strLine.TrimLeft(); TrimRight(); N
		strLine.Trim();
		
		strNum  = strLine.Tokenize(TEXT("\t"),tokenPos);	
		strEng = strLine.Tokenize(TEXT("\t"),tokenPos);	//Get English text
		strCh  = strLine.Tokenize(TEXT("\t"),tokenPos);	
		strRus = strLine.Tokenize(TEXT("\t"),tokenPos);
                
        handleStr();
        tokenPos = 0;
}

BOOL UNReadString(CFile *iFile, CString &strReturn)
{
	TCHAR tc;
	CString strBuff = _T("");
	strReturn = _T("");

	while( ( sizeof(TCHAR) ) == ( iFile->Read(&tc, sizeof(TCHAR))) ) //EOF reached?
	{
		strBuff = tc;

		if(_T("\n") != strBuff) {
			strReturn += strBuff;
		}
		else {
			return TRUE;	//Reached "\n", 1 line added to strReturn
		}
	}
	return FALSE;
}


modified 11-Nov-14 12:55pm.

QuestionRe: Time of reading text file Pin
Richard MacCutchan8-Nov-14 21:33
mveRichard MacCutchan8-Nov-14 21:33 
AnswerRe: Time of reading text file Pin
econy11-Nov-14 2:06
econy11-Nov-14 2:06 
GeneralRe: Time of reading text file Pin
Richard MacCutchan11-Nov-14 5:42
mveRichard MacCutchan11-Nov-14 5:42 
GeneralRe: Time of reading text file Pin
econy11-Nov-14 6:56
econy11-Nov-14 6:56 
GeneralRe: Time of reading text file Pin
Richard MacCutchan11-Nov-14 7:05
mveRichard MacCutchan11-Nov-14 7:05 
GeneralRe: Time of reading text file Pin
econy11-Nov-14 7:17
econy11-Nov-14 7:17 
GeneralRe: Time of reading text file Pin
Richard MacCutchan11-Nov-14 7:25
mveRichard MacCutchan11-Nov-14 7:25 
AnswerRe: Time of reading text file Pin
Aescleal12-Nov-14 6:01
Aescleal12-Nov-14 6:01 
QuestionOptimized Solution for prime numbers.. Pin
Raunak Singh Chauhan6-Nov-14 6:20
Raunak Singh Chauhan6-Nov-14 6:20 
AnswerRe: Optimized Solution for prime numbers.. Pin
Nicolas Dorier6-Nov-14 6:45
professionalNicolas Dorier6-Nov-14 6:45 
GeneralRe: Optimized Solution for prime numbers.. Pin
Raunak Singh Chauhan6-Nov-14 6:49
Raunak Singh Chauhan6-Nov-14 6:49 
GeneralRe: Optimized Solution for prime numbers.. Pin
Nicolas Dorier6-Nov-14 6:56
professionalNicolas Dorier6-Nov-14 6:56 
AnswerRe: Optimized Solution for prime numbers.. Pin
Bernhard Hiller6-Nov-14 22:06
Bernhard Hiller6-Nov-14 22:06 
Questionget IP address from Net Address Control (Resolved) Pin
bkelly1310-Oct-14 16:06
bkelly1310-Oct-14 16:06 
AnswerRe: get IP address from Net Address Control Pin
Richard MacCutchan10-Oct-14 21:18
mveRichard MacCutchan10-Oct-14 21:18 
GeneralRe: get IP address from Net Address Control Pin
bkelly1311-Oct-14 9:11
bkelly1311-Oct-14 9:11 
GeneralRe: get IP address from Net Address Control Pin
Richard MacCutchan13-Oct-14 5:10
mveRichard MacCutchan13-Oct-14 5:10 

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.