Click here to Skip to main content
15,915,803 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Using STL input iterator reading from a file ?? Pin
George24-Feb-03 1:47
George24-Feb-03 1:47 
GeneralRe: Using STL input iterator reading from a file ?? Pin
Joaquín M López Muñoz4-Feb-03 1:50
Joaquín M López Muñoz4-Feb-03 1:50 
GeneralRe: Using STL input iterator reading from a file ?? Pin
George24-Feb-03 2:12
George24-Feb-03 2:12 
GeneralRe: Using STL input iterator reading from a file ?? Pin
Joaquín M López Muñoz4-Feb-03 2:15
Joaquín M López Muñoz4-Feb-03 2:15 
GeneralRe: Using STL input iterator reading from a file ?? Pin
George24-Feb-03 2:33
George24-Feb-03 2:33 
GeneralRe: Using STL input iterator reading from a file ?? Pin
Joaquín M López Muñoz4-Feb-03 4:22
Joaquín M López Muñoz4-Feb-03 4:22 
GeneralRe: Using STL input iterator reading from a file ?? Pin
George24-Feb-03 6:05
George24-Feb-03 6:05 
GeneralQuestion about STL output iterator. Pin
George23-Feb-03 22:24
George23-Feb-03 22:24 
GeneralRe: Question about STL output iterator. Pin
Joaquín M López Muñoz3-Feb-03 23:02
Joaquín M López Muñoz3-Feb-03 23:02 
GeneralRe: Question about STL output iterator. Pin
George24-Feb-03 0:11
George24-Feb-03 0:11 
GeneralRe: Question about STL output iterator. Pin
Joaquín M López Muñoz4-Feb-03 1:29
Joaquín M López Muñoz4-Feb-03 1:29 
GeneralRe: Question about STL output iterator. Pin
George24-Feb-03 1:44
George24-Feb-03 1:44 
GeneralRe: Question about STL output iterator. Pin
George24-Feb-03 0:49
George24-Feb-03 0:49 
GeneralMeeting troubles when compiling simple STL program. Pin
George23-Feb-03 17:35
George23-Feb-03 17:35 
GeneralRe: Meeting troubles when compiling simple STL program. Pin
Michael Dunn3-Feb-03 19:56
sitebuilderMichael Dunn3-Feb-03 19:56 
GeneralRe: Meeting troubles when compiling simple STL program. Pin
George23-Feb-03 22:21
George23-Feb-03 22:21 
GeneralRe: Meeting troubles when compiling simple STL program. Pin
Ben Burnett3-Feb-03 20:10
Ben Burnett3-Feb-03 20:10 
GeneralRe: Meeting troubles when compiling simple STL program. Pin
George23-Feb-03 22:17
George23-Feb-03 22:17 
General[Message Deleted] Pin
Frank W. Wu3-Feb-03 8:21
Frank W. Wu3-Feb-03 8:21 
GeneralRe: Can't Compile WTL with ATL 7. Pin
Tim Smith3-Feb-03 8:45
Tim Smith3-Feb-03 8:45 
GeneralRe: Can't Compile WTL with ATL 7. Pin
Kirill Bondar9-Mar-03 17:07
Kirill Bondar9-Mar-03 17:07 
GeneralRe: Can't Compile WTL with ATL 7. Pin
Frank W. Wu10-Mar-03 5:18
Frank W. Wu10-Mar-03 5:18 
General_bstr_t to stl string conversion problem Pin
Anonymous2-Feb-03 19:31
Anonymous2-Feb-03 19:31 
While iterating an ADO Recordset, I am reading a varchar (50) field from database and doing a cast to stl string in following way.


pRecordset->MoveFirst();
while (!pRecordset->adoEOF)
{
std::string homeAddress = (const char*) (_bstr_t) pRecordset->GetFields()->GetItem("HomeAddress")->Value;

// Doing some other stuff with string
pRecordset ->MoveNext();
}

HomeAddress field in database has quite a lot of records that have spaces embedded into them. I have seen that there is no problem until cast to const char*, but copying this into std::string sometimes get correct values and some times have garbage.

Initially I thought that It might be a problem for only records where it has space, but sometimes I am able to get correct value in std:string no matter it has space or not. I also tried replacing all the whitespace character with a space just to make sure that there is no null(\0) , but no luck.

Any help or tips on this would be highly appreciated

GeneralRe: _bstr_t to stl string conversion problem Pin
Michael Dunn2-Feb-03 19:40
sitebuilderMichael Dunn2-Feb-03 19:40 
GeneralRe: _bstr_t to stl string conversion problem Pin
Anonymous2-Feb-03 19:48
Anonymous2-Feb-03 19:48 

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.