RE: [Dev-C++] Problem with header files
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: sushmita u. <sus...@ya...> - 2001-01-16 11:33:41
|
If String is a file then include it by
#include"string.cpp" or the path which is where the
compiler will search the file string.
--- James Gordon <Jam...@Cl...> wrote:
> string.h is the C style string functions e.g.
> strcpy, strcmp etc.
> string is the C++ string class.
>
> #include <string>
>
> using namespace std;
>
> int main()
> {
> string myString = "Fred";
> myString += " woz ere!";
> ...
> }
>
> You can only use string if you are compiling a C++
> source (.cpp file).
>
> Regards,
>
> James.
>
>
>
> -----Original Message-----
> From: Brandon [mailto:bor...@ho...]
> Sent: Monday, January 15, 2001 11:57 PM
> To: dev...@li...
> Subject: [Dev-C++] Problem with header files
>
>
> Hey, I started messing with the syntax of header
> files and I found I can
> use 'string' instead of a character array when I use
> "#include <string>"
> instead of "#include <string.h>". Why is does this
> happen? What are the
> advantages, besides 'string', of using any header
> file without the .h
> extension?
> Thanks.
>
> Signed,
> Brandon
>
>
>
> * * * * * * * * * * * * * * * * * * * * * * * * * *
> * * * * * * * *
> This electronic message and any attachment is
> intended to be
> read by the named addressee(s) only.
> Any other recipient should be aware that its
> contents may be
> legally privileged and/or confidential and that its
> use,
> disclosure, copying or distribution may be unlawful.
>
> Unless you are a named addressee, please delete this
> message
>
> Whilst C. & J. Clark International Limited has taken
> steps
> to prevent the transmission of computer viruses with
> electronic mail,
> responsibility for screening incoming messages and
> the risk of such
> transmission and its consequences lies with the
> recipient.
>
> C. & J. Clark International Limited
> Registered in England and Wales
> Company No. 141015
> Registered Office: 40 High Street, Street, Somerset
> BA16 0YA
> Telephone: +44 (0) 1458 443131
> Fax: +44 (0) 1458 447547
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
>
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
|