Re: std::string, C strings and c_str()
From: Alwyn (dt015a1979_at_mac.com.invalid)
Date: 11/02/04
- Next message: Sathyaish: "Re: Please review my tutorial"
- Previous message: Billy N. Patton: "stl documentation and stl_hashtable"
- In reply to: Tabrez Iqbal: "Re: std::string, C strings and c_str()"
- Next in thread: Anand Hariharan: "Re: std::string, C strings and c_str()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 02 Nov 2004 12:21:50 +0000
In article <42cd213e.0411011854.3d438e92@posting.google.com>, Tabrez
Iqbal <tabrez19_i@rediffmail.com> wrote:
>
> what does this String class offer over the std::string class other
> than the char * conversion operator?
That's the only thing.
> is the conversion operator worth
> the simplicity that it offers over std::string::c_str() method call?
But std::string's c_str() function returns 'const char *', which would
have been of no use to the OP. This at least automates the allocation
and deallocation of memory. A makeshift solution perhaps, but maybe
also better than nothing in the circumstances.
Alwyn
- Next message: Sathyaish: "Re: Please review my tutorial"
- Previous message: Billy N. Patton: "stl documentation and stl_hashtable"
- In reply to: Tabrez Iqbal: "Re: std::string, C strings and c_str()"
- Next in thread: Anand Hariharan: "Re: std::string, C strings and c_str()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|