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

C / C++ / MFC

 
Questioncapturing keyboard inputs Pin
Adnan Merter5-Apr-08 13:09
Adnan Merter5-Apr-08 13:09 
GeneralRe: capturing keyboard inputs Pin
Mark Salsbery5-Apr-08 13:18
Mark Salsbery5-Apr-08 13:18 
GeneralRe: capturing keyboard inputs Pin
Adnan Merter5-Apr-08 13:21
Adnan Merter5-Apr-08 13:21 
GeneralA bug made by "connectioin string" (ODBC) Pin
Joseph Marzbani5-Apr-08 9:15
Joseph Marzbani5-Apr-08 9:15 
GeneralRe: A bug made by "connectioin string" (ODBC) Pin
Mark Salsbery5-Apr-08 11:36
Mark Salsbery5-Apr-08 11:36 
QuestionHow to read the values inside a txt file into an array? Pin
johndoelee5-Apr-08 5:09
johndoelee5-Apr-08 5:09 
GeneralRe: How to read the values inside a txt file into an array? Pin
Eytukan5-Apr-08 7:55
Eytukan5-Apr-08 7:55 
GeneralRe: How to read the values inside a txt file into an array? [modified] Pin
Joseph Marzbani5-Apr-08 9:02
Joseph Marzbani5-Apr-08 9:02 
CStringArray straYourArray;<br />
CString strArrayElement=_T("");<br />
CFile file(_T("YourFilePath"), CFile::modeRead);<br />
ULONG uSize=file.GetLength();<br />
ULONG uToken=0;<br />
BYTE *Buffer=new BYTE[uSize]={0};<br />
<br />
file.Read(Buffer, uSize);<br />
for(int iCountor=0; iCountor<usize; icountor++)<br />
{<br />
   if(Buffer[iCountor]=='Tab ASCII Code')//I've forgotten it at this time<br />
   {<br />
      strArrayElement.SetString(Buffer, iCountor-uToken);<br />
      straYourArray.Add(strArrayElement);<br />
      uToken=iCountor;<br />
   }<br />
}<br />
file.Close();<br />


Sorry for not to offer comments...
Any question?

modified on Saturday, April 5, 2008 10:32 PM

GeneralRe: How to read the values inside a txt file into an array? Pin
CPallini5-Apr-08 10:33
mveCPallini5-Apr-08 10:33 
GeneralRe: How to read the values inside a txt file into an array? Pin
Joseph Marzbani5-Apr-08 16:25
Joseph Marzbani5-Apr-08 16:25 
GeneralRe: How to read the values inside a txt file into an array? Pin
CPallini5-Apr-08 21:41
mveCPallini5-Apr-08 21:41 
GeneralRe: How to read the values inside a txt file into an array? Pin
Eytukan5-Apr-08 17:53
Eytukan5-Apr-08 17:53 
GeneralRe: How to read the values inside a txt file into an array? Pin
CPallini5-Apr-08 21:39
mveCPallini5-Apr-08 21:39 
GeneralRe: How to read the values inside a txt file into an array? Pin
Eytukan5-Apr-08 21:49
Eytukan5-Apr-08 21:49 
GeneralRe: How to read the values inside a txt file into an array? Pin
CPallini5-Apr-08 22:20
mveCPallini5-Apr-08 22:20 
GeneralRe: How to read the values inside a txt file into an array? Pin
Eytukan5-Apr-08 22:43
Eytukan5-Apr-08 22:43 
GeneralRe: How to read the values inside a txt file into an array? [modified] Pin
Rajesh R Subramanian5-Apr-08 22:20
professionalRajesh R Subramanian5-Apr-08 22:20 
GeneralRe: How to read the values inside a txt file into an array? Pin
Eytukan5-Apr-08 22:38
Eytukan5-Apr-08 22:38 
GeneralRe: How to read the values inside a txt file into an array? Pin
Rajesh R Subramanian5-Apr-08 22:43
professionalRajesh R Subramanian5-Apr-08 22:43 
JokeRe: How to read the values inside a txt file into an array? Pin
Eytukan5-Apr-08 22:44
Eytukan5-Apr-08 22:44 
JokeRe: How to read the values inside a txt file into an array? Pin
Rajesh R Subramanian5-Apr-08 22:47
professionalRajesh R Subramanian5-Apr-08 22:47 
AnswerRe: How to read the values inside a txt file into an array? Pin
Eytukan5-Apr-08 22:51
Eytukan5-Apr-08 22:51 
GeneralRe: How to read the values inside a txt file into an array? Pin
Rajesh R Subramanian5-Apr-08 22:57
professionalRajesh R Subramanian5-Apr-08 22:57 
QuestionRe: How to read the values inside a txt file into an array? Pin
johndoelee5-Apr-08 23:05
johndoelee5-Apr-08 23:05 
GeneralRe: How to read the values inside a txt file into an array? Pin
Eytukan5-Apr-08 23:12
Eytukan5-Apr-08 23: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.