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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:29:07+00:00 2026-05-26T17:29:07+00:00

Suppose I am writing an if statement in C++ with VS2008. I’m inside a

  • 0

Suppose I am writing an if statement in C++ with VS2008. I’m inside a function and therefore indented (a tab from the left margin, say). I type if{, hit enter and I’m now two tabs from the marging – I’m happy 🙂

I move the cursor up a few lines to copy something and then back to just under the if{. Lo and behold, my cursor is now right against the left margin and I’ve lost my indentation. Grumpy! >:-(

I’m wasting my time retyping tabs and it’s driving me bonkers. Please help me unlock the secret setting that allows me to get on with my work.

Edit: Incidentally, whilst developing in C# I experience the desired behaviour. It’s just C++ that loses the auto-indentation.

  • 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-26T17:29:08+00:00Added an answer on May 26, 2026 at 5:29 pm

    To the best of my knowledge, there is no setting to get this to work in VS2008.
    In VS2010, it does behave how you would expect.
    If you can, I would recommend using VS2010. If you are doing c++-cli, you can set the project to use the .Net 3.5 framework, and then it compiles using VS2008. If you are doing vanilla c++, you can go into the project property pages, General and set the Platform Toolset to v90 to get it to compile using VS2008. Of course, you could just compile using VS2010 if that’s an option for you.

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

Sidebar

Related Questions

Suppose I am writing a substitute function on an abstract syntax tree data type:
Suppose I'm writing a function that takes a list of integers and returns only
Suppose I am writing a template library consisting of a function template template<T> void
I m having a Class suppose Function I m writing such code class FunctionsList
Suppose I am writing an application in C++ and C#. I want to write
Suppose I'm writing an SNMP v1/2 agent. Is it mandatory to append the instance
Suppose we are writing a class (let's call it Class) in an iPhone program.
Suppose both parent and child use one pipe for writing and reading means when
Suppose, I have a connected socket after writing this code.. if ((sd = accept(socket_d,
I'm writing an app that supposed to copy a bunch of files from one

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.