Click here to Skip to main content
16,014,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Flame me to a crisp, but... Pin
Brian Delahunty1-Jun-02 9:28
Brian Delahunty1-Jun-02 9:28 
GeneralProtected Storage Service Pin
David Lau1-Jun-02 8:17
David Lau1-Jun-02 8:17 
Generalspeed up Pin
pnpfriend1-Jun-02 6:48
pnpfriend1-Jun-02 6:48 
GeneralRe: speed up Pin
Joaquín M López Muñoz1-Jun-02 6:56
Joaquín M López Muñoz1-Jun-02 6:56 
GeneralRe: speed up Pin
Brian Delahunty1-Jun-02 7:11
Brian Delahunty1-Jun-02 7:11 
GeneralRe: speed up Pin
pnpfriend1-Jun-02 7:52
pnpfriend1-Jun-02 7:52 
GeneralRe: speed up Pin
Brian Delahunty1-Jun-02 9:33
Brian Delahunty1-Jun-02 9:33 
GeneralRe: speed up Pin
pnpfriend1-Jun-02 9:47
pnpfriend1-Jun-02 9:47 
oh.. i was trying to use it.. can you check my post which way is better.. no. let me post it back here again.
i have a structure, call
<br />
struct FileType<br />
{<br />
  char type[_MAX_EXT];<br />
  char size[20];<br />
   <br />
};<br />
<br />

and the text file that looks like

.txt 4140
.tif 4100
.doc 21000
.pdf 3459
.
.
.


so i want to read from the text file and put it into array.
so used vector.

<br />
#include <vector><br />
typedef vector<TypeSize> typeNsize;<br />
<br />
  TypeSize typeNsize;<br />
<br />
  ifstream filelist("TableOfType.txt",ios::in);   //open TableOfType.txt  <br />
  while(!filelist.eof())<br />
  {<br />
    filelist>>typeNsize.filetype>>typeNsize.size;<br />
    <br />
  }<br />
  filelist.close();<br />

my application is dialog base.

and i have following errors
<br />
<br />
SMPprojectDlg.cpp<br />
E:\SMP\SMPprojectDlg.cpp(2161) : error C2143: syntax error : missing ';' before '<'<br />
E:\SMP\SMPprojectDlg.cpp(2161) : error C2143: syntax error : missing ';' before '<'<br />
E:\SMP\SMPprojectDlg.cpp(2163) : error C2065: 'TypeSize' : undeclared identifier<br />
E:\SMP\SMPprojectDlg.cpp(2163) : error C2146: syntax error : missing ';' before identifier 'typeNsize'<br />
E:\SMP\SMPprojectDlg.cpp(2163) : error C2065: 'typeNsize' : undeclared identifier<br />
E:\SMP\SMPprojectDlg.cpp(2168) : error C2228: left of '.filetype' must have class/struct/union type<br />
E:\SMP\SMPprojectDlg.cpp(2168) : error C2228: left of '.size' must have class/struct/union type<br />
Error executing cl.exe.<br />
<br />
SMPproject.exe - 7 error(s), 0 warning(s)<br />


i was thinking to use CStringArray like read the sentence like
<br />
char info[50];<br />
filelist.getline(info,50,'\n');<br />
CString infoline = (const char*)info;<br />
CStringArray array;<br />
array.add(infoline)<br />

if i do so , i have to separate the string into two parts, type and size, again. i dont' want to do that..
do you have any idea better than what i have right now?
GeneralRe: speed up Pin
Brian Delahunty1-Jun-02 10:05
Brian Delahunty1-Jun-02 10:05 
GeneralRe: speed up Pin
pnpfriend1-Jun-02 10:39
pnpfriend1-Jun-02 10:39 
GeneralRe: speed up Pin
Brian Delahunty1-Jun-02 10:35
Brian Delahunty1-Jun-02 10:35 
Questiongeting start and end address of a running process? Pin
hwnd1-Jun-02 6:26
hwnd1-Jun-02 6:26 
AnswerRe: geting start and end address of a running process? Pin
Mike Nordell1-Jun-02 7:02
Mike Nordell1-Jun-02 7:02 
GeneralLimiting Characters in Edit Box :: MFC Pin
valikac1-Jun-02 5:30
valikac1-Jun-02 5:30 
GeneralRe: Limiting Characters in Edit Box :: MFC Pin
Joaquín M López Muñoz1-Jun-02 5:38
Joaquín M López Muñoz1-Jun-02 5:38 
GeneralRe: Limiting Characters in Edit Box :: MFC Pin
dlhson1-Jun-02 5:49
dlhson1-Jun-02 5:49 
GeneralRe: Limiting Characters in Edit Box :: MFC Pin
valikac1-Jun-02 6:15
valikac1-Jun-02 6:15 
GeneralRe: Limiting Characters in Edit Box :: MFC Pin
Michael P Butler1-Jun-02 7:22
Michael P Butler1-Jun-02 7:22 
GeneralSolution Pin
valikac1-Jun-02 7:15
valikac1-Jun-02 7:15 
QuestionUsing Unicode in Editbox, ListControl and CString ? Pin
dlhson1-Jun-02 4:09
dlhson1-Jun-02 4:09 
AnswerRe: Using Unicode in Editbox, ListControl and CString ? Pin
Paul M Watt1-Jun-02 18:22
mentorPaul M Watt1-Jun-02 18:22 
QuestionGet char pos of RichEditControl ? Pin
dlhson1-Jun-02 3:58
dlhson1-Jun-02 3:58 
AnswerRe: Get char pos of RichEditControl ? Pin
Ed Gadziemski1-Jun-02 10:56
professionalEd Gadziemski1-Jun-02 10:56 
GeneralRetrieve "Data traffic" Pin
XAlien1-Jun-02 3:16
XAlien1-Jun-02 3:16 
GeneralRe: Retrieve "Data traffic" Pin
Paul M Watt1-Jun-02 8:33
mentorPaul M Watt1-Jun-02 8:33 

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.