CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2012
    Posts
    2

    Help with this CPP please. What could be wrong here?

    char optionPackageCodeArray [5] = {'BB','SP','NP','HE','UC'};
    double packageCostArray [5] = {1500,3250,4575,7500,5220};
    string packageNameArray [5] = {"Base","Sport","Intermediate level","Luxury","User Specified"};
    Last edited by Mogesi; December 6th, 2012 at 08:53 PM.

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Help with this CPP please. What could be wrong here?

    Lots of things. Assuming you're talking about the compilation errors,
    Code:
        char optionPackageCodeArray [5] = {'BB','SP','NP','HE','UC'};
    A char can hold one and only one character. You're trying to stick two in there.

    There are other errors after that, but start there.

  3. #3
    Join Date
    Dec 2012
    Posts
    2

    Re: Help with this CPP please. What could be wrong here?

    Thanks for the insight. Let me check it out again.

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