Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/resources/dev-envs/visual-studio-community.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ You should now see an empty screen with the "Solution Explorer" on either side o

## Getting Started with C

::: info
TODO: Add documentation for C
:::
Visual Studio does not have a "C Project" option. You should use a C++ project, even for C.

To use C in Visual Studio:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unnecessary step and extra information. You do not have to do this for C. Naming a file with a .c extension is sufficient for VS to treat it as a C file instead of a C++ file.

The way I see it, there are two valid choices here:

  1. Merge the "Getting Started with C++" and "Getting Started with C" sections into a single section, with a note to make it *.cpp or *.c depending on what language you're using.
  2. Copy the CPP section word for word, making any C specific changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I actually didn't know that, my bad. It has been some time since I used MSVC from VS for C, and I need this if I'm not in MSBuild.

* Use `.c` files
* Turn on the "Compile as C" option

You can find this option under Project Properties (right click your Project and click Properties) > C/C++ > Advanced > Compile As > Compile as C Code (/TC)

## Running Your Program

Expand Down