CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Threaded View

  1. #5
    Join Date
    Jan 2008
    Location
    California, USA
    Posts
    822

    Re: string - char* mix and match??

    Hello Muthuveerappan
    Quote Originally Posted by Muthuveerappan View Post
    Its good to to know 2 basic things:


    1) char is a built in data type - It stores as an array of characters terminated by '\0'. So always treat it like an character array.
    I think it's good to clarify that char itself is not an array. It can only hold a single char. Not all char arrays are null terminated. I think what you're refering to is the C-style character strings (null terminated char array). Another good thing to keep in mind is that string literal is an array of const char.
    Last edited by potatoCode; April 4th, 2009 at 08:54 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured