Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6631685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:34:53+00:00 2026-05-25T22:34:53+00:00

Below is the code I’ve come up with and in all honesty tonight is

  • 0

Below is the code I’ve come up with and in all honesty tonight is my first attempt at coding at all. However I cannot seem to get my if statement to work properly. It just simply jumps to else even if I type Westley or westley or (space)Westley.

I want the program to be able to accept any of my team members names however I figured I get my name working and then I could add the rest of them later. Any thoughts or help would be wonderful. Also as a side note I was going to try and loop it if it went to the else back up to the begining any thoughts on that as well? Thank you

#include <iostream>
using namespace std;

int main ()
{
  char Westley[] = "Westley";
  char Alex[] = "Alex";
  char Andrea[] = "Andrea";
  char Bee[] = "Bee";
  char Gia[] = "Gia";
  char KaYeng[] = "Ka Yeng";
  char Chi[] = "Chi";
  char Corinne[] = "Corinne";
  char Joyce[] = "Joyce";
  char Parish[] = "Parish";
  char membername [80];
  cout << "Please Enter a Beta Team Members Name.\n";
  cin >> membername;
  if (membername == Westley)
  {   cout << "BETA TEAM ROSTER!!\n";
      cout << "Westley.\n";
      cout << "Alex.\n";
      cout << "Andrea.\n";
      cout << "Bee.\n";
      cout << "Gia.\n";
      cout << "Ka Yeng.\n";
      cout << "Chi.\n";
      cout << "Corinne.\n";
      cout << "Joyce.\n";
      cout << "Parish.\n";
  }
  else
      cout << "Not a Valid Beta Team Members Name!\n" << "Please Enter a Beta Team Members Name"<< endl;
cin >> membername;
  return 0;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T22:34:54+00:00Added an answer on May 25, 2026 at 10:34 pm

    First of all, if you are coding with C++ you should use std::string instead of char []. It has the convenience that you can compare two strings (alas with char [] you have to call functions like strcmp or the like).

    For example:

    #include <iostream>
    #include <string> // <-- important
    using namespace std;
    
    int main ()
    {
        string Westley("Westley");
        ...
    
        if(membername == Westley) // now works!
        {
            ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The below code works fine for only the first click event. However for any
The below code seems like it should work; however, the blob in the database
Below code doesn't seem to change the background color of dropdownlist. Please advice. var
The below code searches, copies & pastes the found data into another worksheet. However,
The below code works fine when i am not adding any extra row all
in below code when i run it i get y=-124 and z=4294967172 can you
The below code will block all the keyboard shortcuts. Since i wanted to implement
below code: def http = new HTTPBuilder( 'http://twitter.com/statuses/' ) http.get( path: 'user_timeline.json', query: [id:'httpbuilder',
Below code saying error incorreect syntax near Main INSERT INTO tbl ( 'Week', Main,
The below code is very simple. I have a jQuery autocomplete bound to an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.