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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:22:10+00:00 2026-05-27T10:22:10+00:00

I’m new to coding C++ programs in Visual Studio. When I am coding C#

  • 0

I’m new to coding C++ programs in Visual Studio. When I am coding C# programs in VS, code formatter changes code that looked like this

for(int i= 0; i<(n+  m) ;  i++){
}

into

for(int i = 0; i < (n + m); i++)
{
}

which is way easier to read. When I write the same thing in C++, nothing happens. I tried to select the text and press Ctrl+E, F, but that didn’t work. Is there a way to improve the C++ code formatter in visual studio?

  • 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-27T10:22:11+00:00Added an answer on May 27, 2026 at 10:22 am

    Visual Studio can’t format C++-Code. Maybe there is a VS extension. I searched a long time, but never found a suitable one for free.

    A very good, free, but not easy to use code formatter is GreatCode. Its a command line tool.

    You can configure it as “External Tool”:

    After unpacking GreatCode on your HD just go Tools->External Tools->Add and insert the following settings…

    enter image description here

    Whenever you call that Tool, the actual opened file is being formatted.

    You can configure GreatCode as you like in the gc.cfg. I tried many options, some are easy, some are complex.

    If you want a Microsoft-like looking, just use my settings as a template and fine tune yourself:

    -code_constructor_style-1
    -code_split_fctdef_style-5
    -code_split_decl_style-2
    -overwrite_read_only-
    -verbose-
    -tab_out-
    -space_if-
    -space_return-
    -space_fctcall_inparam-
    -no-space_fctcall_firstparam-
    -no-space_cast_after-
    -space_affect_style-0
    -space_autoaffect_style-0
    -code_len-180
    -code_keep_more_empty_lines-
    -code_decl_access_to_type-
    -code_decl_break_template-
    -code_remove_return_paren-
    -code_align_max_blanks-80
    -code_class_access_eol_after-1
    -code_class_access_eol_before-1
    -code_split_fctcall_style-1
    -code_constructor_style-1
    -no-code_split_bool_before-
    -no-stmt_concat_else_if-
    -no-stmt_decl_remove_empty-
    -no-stmt_concat_if_remove_empty-
    -no-stmt_concat_else_if-
    -stmt_force_brace-1
    -stmt_break_dowhile-
    -stmt_switch_style-1
    -stmt_switch_eol-0
    -stmt_class_indent-0
    -stmt_static_init_style-2
    -stmt_concat_inline_class-
    -pp_align_to_code-
    -pp_style-1
    -pp_align_breakline-
    -no-cmt_first_space_cpp-
    -cmt_dont_modify-
    -no-cmt_add_class_access-
    -no-cmt_add_gc_tag-
    -no-cmt_add_fct_def_class-
    -no-cmt_decl_before-
    -no-cmt_decl-
    -no-cmt_first_line_break_first-
    -no-cmt_first_line_break_last-
    -no-code_split_bool_before-
    -catch_eol_before-1
    -no-stmt_decl_remove_empty-
    -no-cmt_add_fct_def_class-
    -no-cmt_add_class_access-
    -no-stmt_break_alone-
    -stmt_concat_inline_class-
    -cmt_keep_cpp-
    

    Good luck!

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have this code to decode numeric html entities to the UTF8 equivalent character.
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

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.