Click here to Skip to main content
15,891,902 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Problem with exponents... Pin
Mircea Puiu18-Oct-05 21:13
Mircea Puiu18-Oct-05 21:13 
AnswerRe: Problem with exponents... Pin
The NULL Developer18-Oct-05 21:15
professionalThe NULL Developer18-Oct-05 21:15 
QuestionRestore Point Pin
Supriya Tonape18-Oct-05 20:29
Supriya Tonape18-Oct-05 20:29 
AnswerRe: Restore Point Pin
Mircea Puiu18-Oct-05 21:31
Mircea Puiu18-Oct-05 21:31 
QuestionRe: Restore Point Pin
rajender_ms21-Jan-09 0:29
rajender_ms21-Jan-09 0:29 
QuestionDrive size Pin
aasstt18-Oct-05 20:22
aasstt18-Oct-05 20:22 
AnswerRe: Drive size Pin
David Crow19-Oct-05 3:36
David Crow19-Oct-05 3:36 
QuestionHELP -- An alternative to the getline function Pin
webHamlet18-Oct-05 19:34
webHamlet18-Oct-05 19:34 
I'm running the code shown below, and it's just too slow. I'm reading 17k rows and 59 columns from a CSV file and it takes 3 minutes. My computer is not the fastest (5 year old Celeron processor) but still...

I got some great suggestions yesterday: One person mentioned that I should read larger chunks of data instead of one character at a time. Problem is, I don't know how.. Can anybody help?

Note: rawData and record are STL vectors.

rawData.reserve(numberRecords) ;
int counter=0 ;
do
{
counter += 1 ;
std::vector <std::string> record ;
record.reserve(numberVars) ;
for(int i=0; i<numbervars-1; i++)
="" {
="" char="" buff[100]="{0}" ;=""
="" data-="">getline(buff,sizeof(buff),',') ;
record.push_back(buff) ;
}
std::getline(*data,value) ;
record.push_back(value) ;
rawData.push_back(record) ;
std::vector < std::string >::iterator j ;
j=record.begin() ;
record.erase(j, j+numberVars) ;
} while (counter < numberRecords) ;


Thanks,

Hamlet
AnswerRe: HELP -- An alternative to the getline function Pin
The NULL Developer18-Oct-05 21:12
professionalThe NULL Developer18-Oct-05 21:12 
AnswerRe: HELP -- An alternative to the getline function Pin
The NULL Developer19-Oct-05 17:57
professionalThe NULL Developer19-Oct-05 17:57 
QuestionSockets in Dll Pin
tobeymag18-Oct-05 19:24
tobeymag18-Oct-05 19:24 
AnswerRe: Sockets in Dll Pin
kakan18-Oct-05 19:29
professionalkakan18-Oct-05 19:29 
GeneralRe: Sockets in Dll Pin
tobeymag19-Oct-05 18:53
tobeymag19-Oct-05 18:53 
QuestionDo u agree... Pin
alex.barylski18-Oct-05 18:08
alex.barylski18-Oct-05 18:08 
AnswerRe: Do u agree... Pin
The NULL Developer18-Oct-05 18:19
professionalThe NULL Developer18-Oct-05 18:19 
AnswerRe: Do u agree... Pin
Christian Graus18-Oct-05 18:19
protectorChristian Graus18-Oct-05 18:19 
AnswerRe: Do u agree... Pin
Bob Stanneveld18-Oct-05 23:34
Bob Stanneveld18-Oct-05 23:34 
GeneralRe: Do u agree... Pin
vikas amin18-Oct-05 20:02
vikas amin18-Oct-05 20:02 
GeneralRe: Do u agree... Pin
Christian Graus20-Oct-05 9:40
protectorChristian Graus20-Oct-05 9:40 
QuestionProblem with BEGIN_EVENTSINK_MAP Pin
Eldon Zacek18-Oct-05 17:53
Eldon Zacek18-Oct-05 17:53 
AnswerRe: Problem with BEGIN_EVENTSINK_MAP Pin
Mircea Puiu18-Oct-05 21:47
Mircea Puiu18-Oct-05 21:47 
AnswerRe: Problem with BEGIN_EVENTSINK_MAP Pin
Eldon Zacek19-Oct-05 1:29
Eldon Zacek19-Oct-05 1:29 
QuestionDrawText is too slow. Pin
William.Wang18-Oct-05 17:26
William.Wang18-Oct-05 17:26 
AnswerRe: DrawText is too slow. Pin
alex.barylski18-Oct-05 18:10
alex.barylski18-Oct-05 18:10 
QuestionRe: DrawText is too slow. Pin
William.Wang18-Oct-05 19:41
William.Wang18-Oct-05 19:41 

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.