Creating an Array of Strings
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Creating an Array of Strings

  1. #1
    Join Date
    Mar 2004
    Posts
    11

    Creating an Array of Strings

    can anyone tell me why this wont work,

    #include<iostream>
    #include<string>
    using namespace std;

    string testarray[3] = {"please","help","me"};

    id appreciate any help given thanks

  2. #2
    Join Date
    Apr 1999
    Posts
    27,418

    Re: Creating an Array of Strings

    Originally posted by Keith10100
    can anyone tell me why this wont work,

    #include<iostream>
    #include<string>
    using namespace std;

    string testarray[3] = {"please","help","me"};

    id appreciate any help given thanks
    I took your code and compiled with no errors and no warnings (VC++ 6.0). What do you mean by "this won't work"?

    Regards,

    Paul McKenzie

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center