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

Threaded View

  1. #10
    Join Date
    Jul 2007
    Posts
    16

    Re: basic string scope in std namespace

    I think I need to get my head wrapped around strings better first. I thought I had a grasp on what * was used for. But I am seeing it used in contexts I don't understand. I can see now why people pick python over C, but I really want to get a handle on this.

    Example that I get:
    Code:
    a = '6';
    b = &a;  // points to the mem address
    c = *b; 
    cout << c; // should return 6
    But then I see this for example, does this mean its passing a reference?

    Code:
    int main(int argc, char* argv[])
    Also when you say "expecting a (non-const) char*" do you mean the function is expecting a pointer and not the real content. Such as my example, its expecting the var c not a?
    Last edited by ryanmills; May 31st, 2009 at 01:26 AM.

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