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?
asked Dec 15, 2020 at 19:21
Sergey Kalinichenko
729k8585 gold badges1.2k1.2k silver badges1.6k1.6k bronze badges
Add a comment |
1 Answer 1
Make a file association for C extensions to map to C++ as follows:
- Open settings (Ctrl+,) and scroll down to Files:Associations.
- Click [Add Item]
- Type *.C for the key and cpp for Value
- Click [OK]
answered Dec 15, 2020 at 19:34
Sergey Kalinichenko
729k8585 gold badges1.2k1.2k silver badges1.6k1.6k bronze badges
Sign up to request clarification or add additional context in comments.
Comments
- The Overflow Blog
-
-
- Featured on Meta
-
-
-
Related
Hot Network Questions
- Is user enumeration a problem for a passwordless app?
- What is a Foreign Word™?
- Why is Sophocles's play typically known by a Latin title?
- Is there an official teacher's manual for 三字经?
- How do i show that the outermorphism of a linear transformation is basis independent
- Is non-gavage fois gras available in France?
- Is Iodine Violet or Purple in colour?
- Urgent clarification on transit and Schengen visa requirement at Milan Malpensa Airport (MXP)
- Stacking of Shield spell when used with Enspelled Armor
- Run WinSCP as FTP server
- Splitting a sentence into characters (incl. spaces) and displaying each character in a tikz node
- Why does dd read only part of the specified data?
- Luz, the city and hazel
- How to use gdalwarp to cut, reproject and resample SWEREF99-using rasters so that the result cannot be easily demonstrated to be wrong in QGIS?
- Did Indy need to access the map room?
- What is the difference between the classical decision theoretic setting and the decision theoretic setting in ML and statistical learning?
- Strategies to overcome frustration when research becomes a bunch of soul-crushing debugging
- Why is the main character's automated assistant named "Sisyphus" in Greg Egan's "Distress"?
- How does that one wire type circuit work?
- How much does the "Ottomans's consent" argument of the British Museum hold regarding the Elgin Marbles?
- Section title with \star
- What should I do if my foreshadowing was too obvious and readers picked up on it immediately?
- Motivating the definition of a stack
- Short story a watcher who sleeps ten thousand years and wakes to destabilize stagnant civilization if needed 1980s or earlier