Click here to Skip to main content
15,922,650 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Vector Pin
Nemanja Trifunovic3-Oct-07 7:47
Nemanja Trifunovic3-Oct-07 7:47 
AnswerRe: Vector Pin
Nathan Holt at EMOM3-Oct-07 11:10
Nathan Holt at EMOM3-Oct-07 11:10 
AnswerRe: Vector Pin
John R. Shaw6-Oct-07 0:55
John R. Shaw6-Oct-07 0:55 
QuestionHow to detect page refresh in vc++ Pin
rindam3-Oct-07 3:19
rindam3-Oct-07 3:19 
Questionsending sms through aspx.cs code in c# Pin
sh_india61@yahoo.com3-Oct-07 2:39
sh_india61@yahoo.com3-Oct-07 2:39 
AnswerRe: sending sms through aspx.cs code in c# Pin
vadivelub7-Apr-09 5:07
vadivelub7-Apr-09 5:07 
QuestionString problem Pin
david bagaturia1-Oct-07 22:19
david bagaturia1-Oct-07 22:19 
AnswerRe: String problem Pin
Jonas Larsson2-Oct-07 0:49
Jonas Larsson2-Oct-07 0:49 
Hello,

If you refer to your STL implementation doc's, you should find that data(): "Returns a pointer to an array of characters, not necessarily null-terminated, representing the string's contents", so it's probably a bad idea to pass that to a function that expects 0-terminated 'strings'. You should use c_str() instead, if you want to use strcmp.

A better way, if you're just testing for equality, would be to use std::string's operator ==(), as in
if (str_1 == str_1)

HTH
Jonas

---

"Man will never be free until the last king is strangled with the entrails of the last priest". -- Denis Diderot

GeneralRe: String problem Pin
david bagaturia2-Oct-07 3:38
david bagaturia2-Oct-07 3:38 
GeneralRe: String problem Pin
Stephen Hewitt2-Oct-07 4:43
Stephen Hewitt2-Oct-07 4:43 
GeneralRe: String problem Pin
Jonas Larsson2-Oct-07 21:58
Jonas Larsson2-Oct-07 21:58 
GeneralRe: String problem Pin
david bagaturia3-Oct-07 0:03
david bagaturia3-Oct-07 0:03 
AnswerRe: String problem Pin
John R. Shaw6-Oct-07 1:04
John R. Shaw6-Oct-07 1:04 
Questionwhere is the mistake here? Pin
rindam1-Oct-07 3:02
rindam1-Oct-07 3:02 
AnswerRe: where is the mistake here? Pin
led mike1-Oct-07 4:54
led mike1-Oct-07 4:54 
QuestionHow to print the cookie value Pin
rindam1-Oct-07 0:52
rindam1-Oct-07 0:52 
AnswerRe: reading cookie vakue in vc++ Pin
david bagaturia1-Oct-07 22:36
david bagaturia1-Oct-07 22:36 
QuestionInternetGetCookie returning false always,plz help me to read cookie value from VC++ Pin
rindam30-Sep-07 19:07
rindam30-Sep-07 19:07 
AnswerRe: InternetGetCookie returning false always,plz help me to read cookie value from VC++ Pin
Stuart Dootson30-Sep-07 20:49
professionalStuart Dootson30-Sep-07 20:49 
GeneralRe: InternetGetCookie returning false always,plz help me to read cookie value from VC++ Pin
rindam30-Sep-07 21:26
rindam30-Sep-07 21:26 
GeneralRe: InternetGetCookie returning false always,plz help me to read cookie value from VC++ Pin
rindam30-Sep-07 23:52
rindam30-Sep-07 23:52 
GeneralRe: InternetGetCookie returning false always,plz help me to read cookie value from VC++ Pin
Stuart Dootson1-Oct-07 4:28
professionalStuart Dootson1-Oct-07 4:28 
Questionbitwise operators for std string? Pin
mellib30-Sep-07 9:45
mellib30-Sep-07 9:45 
AnswerRe: bitwise operators for std string? Pin
Stuart Dootson30-Sep-07 20:38
professionalStuart Dootson30-Sep-07 20:38 
QuestionHow to read cookie for particular site from VC++ Pin
rindam28-Sep-07 21:47
rindam28-Sep-07 21:47 

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.