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

  • Home
  • SEARCH
  • 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 5838663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:29:31+00:00 2026-05-22T11:29:31+00:00

When I use i++++ give compile error : for (int i=1;i<=10;i++++) {} //a.cpp:63: error:

  • 0

When I use i++++ give compile error :

for (int i=1;i<=10;i++++) {} //a.cpp:63: error: lvalue required as increment operand

or

int i = 0;
i++++; // a.cpp:65: error: lvalue required as increment operand

but when I use ++++i is working. Anybody explain me why ++++i regular but i++++ not regular?

Thanks.

  • 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-22T11:29:31+00:00Added an answer on May 22, 2026 at 11:29 am

    Since type of x is built-in primitive type, both expressions invoke undefined behaviour, as both attempt to modify the same object twice between two sequence points.

    Don’t do either of them.

    Read this FAQ :

    Undefined behavior and sequence points


    However if the type of x is a user-defined type and you’ve overloaded operator++ for both expressions, then both would be well-defined.

    For this, see this topic to know the explanation and details:

    Undefined behavior and sequence points reloaded

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

Sidebar

Related Questions

Can anybody give me an example how to use the osgi framework classes? I
I want to use the minted package to give me syntax highlighting but it
I want to output D:\Learning\CS\Resource\Tutorial\C#LangTutorial But can't work. Compiler error error CS0165: Use of
Since enumeration uses integers, what other structure can I use to give me enum-like
Can someone give an example of a good time to actually use unsafe and
I want to give credit to all open source libraries we use in our
I am trying to use some Word 2007 automation where we give the user
When I use a ASP:Calendar control, and give it an ID: <asp:Calendar runat=server ID=MyCal
Can someone give me a heads up... I'm trying to use the dotRAS .NET
How do you give a C# auto-property an initial value? I either use the

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.