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

Threaded View

  1. #5
    Join Date
    Feb 2005
    Location
    "The Capital"
    Posts
    5,306

    Thumbs up Re: conceptual problem

    An addition to the list Paul mentioned.
    Quote Originally Posted by psullsack
    const char *s = NULL;
    There can be no use of 's' now. It cannot be changed and if you however attempt changing it using const_cast it would result in an undefined behaviour. What is the use of it? You already have the NULL macro pre-defined. Any further usage of the variable 's' in your code is not correct. I also suggest you to use std::string. Please use it. You can learn about it from here:
    C++ string
    Hope this helps. Regards.
    Last edited by exterminator; October 22nd, 2005 at 07:19 AM. Reason: added the link

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