In The C++ Dot Operator lecture, the instructor demonstrates typing his variable followed by the dot operator (ie “HiddenWord.”) and Visual Studio Code offers suggestions of functions that can be used after the dot operator. Similarly, he hovers over “HiddenWord.Len()” and Visual Studio Code shows some information.
Mine isn’t doing those things. How do I enable this? I’m on PC, Windows 10, using Visual Studio Code 1.45.0 (System Setup), and in extensions I do have the C/C++ Intellisense extension enabled globally.
I tried that, but it didn’t change anything for me. To clarify, it’s not that intellisense isn’t working at all, but it’s not working in these specific instances where it did work for the instructor.
Can you find any steps to reproduce the problem, or is it isolated to your PC? Try opening a new file, create a couple variables, and try to use the dot operator on those. See if it autocompletes.
To specify additional include directories to be searched, place your cursor over any #include directive that displays a green squiggle, then click the lightbulb action when it appears. This opens the file c_cpp_properties.json for editing; here you can specify additional include directories for each platform configuration individually by adding more directories to the ‘browse.path’ property.
List members
When you type a member access symbol ( . or -> ) the editor will display a list of members. As you type additional letters, the list is filtered in real time:
I was having the same issue. I don’t know if this will fix it for you, but it fixed it straight away for me.
When I started this project, I opened BullCowCartridge.cpp and BullCowCartridge.h from my file structure rather than through Unreal Engine.
It turns out I needed to open up the project through Unreal Engine by going to File/Open Visual Studio Code. This opened the entire project and now my the Intellisense feature is working just like in the lectures.