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 8326285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:42:49+00:00 2026-06-09T00:42:49+00:00

I just learned how to program in C++ this last week, and I wrote

  • 0

I just learned how to program in C++ this last week, and I wrote my first program using Microsoft Visual Studios 2010 express. My computer at home is a Mac and doesn’t have MS Visual studios so I decided to use xcode and copy my code from MS visual studios into xcode. For the most part there aren’t any errors except that xcode has a problem with my boolean logic syntax. Here are a few of the examples from my code that it has a problem with:

if(place == 1)
{

cout<< name << " 'IS NOW THE FASTEST JUNIOR IN THE UNITED STATES!!!\n";

cout<< "ABSOLUTLY INCREDIBLE!!!!! WHAT AN AMAZING RACE\n"
    << endl
    << endl;

cout<< "You did it! You won the race and are now the fastest Junior skier in the USA!\n";

cout<< "All that hard work really paid off for you!\n";

    <<endl;
}
else (place >1)
{
cout << "You skied a great race, but unfortunately you did not beat Ben.\n";

cout<< "You can always race again next year and shoot for gold.\n"
    <<endl;
}

The error that comes up says “Expression result unused.” How do I fix this?

  • 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-06-09T00:42:51+00:00Added an answer on June 9, 2026 at 12:42 am

    If we start with the first line of your code snippet (which was much easier to read and understand after formatting it properly):

    else(place >1);
    

    This is the last part of an if statement, and means that if the condition in the if was not true, then do the statement after else. In your case it’s an expression that checks if place is larger than one then throw away the result, so it does nothing really. You probably mean to use else if instead of only else.

    Then look at the next line:

    else (restStopDecision == 2);
    

    Here you do the same mistake again, but now with an else where none are supposed to be, which is an error in itself. You probably mean else if here too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off thank you for reading! So I just learned JSP's and Servlets this
I am new to java just learned it this week, my teacher want me
I just learned about ThreadLocal this morning. I read that it should always be
As I just learned from this question , .NET regexes can access individual matches
I just learned about character sets today, so forgive the newb factor if this
this is my first time using any StackExchange website, so let's see how it
I just learned about the Template Method pattern in this answer to a question
I just learned about ngrep , a cool program that lets you easily sniff
I just learned about comet pattern(Long polling) and very curious to implement a simple
I just learned the hard way that IntPtr.Zero cannot be compared to default(IntPtr). Can

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.