3

Is it possible to configure VS Code plugin for C/C++ to treat .C files as C++ code? The icon in the explorer on the left correctly indicates that my files with .C extension are C++, but intellisense treats C++ constructs inside these files as errors. Renaming the file to .cpp avoids this problem. Is there a configuration setting that would let me specify that .C extension corresponds to C++ code?

1 Answer 1

4

Make a file association for C extensions to map to C++ as follows:

  1. Open settings (Ctrl+,) and scroll down to Files:Associations.
  2. Click [Add Item]
  3. Type *.C for the key and cpp for Value
  4. Click [OK]
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.