0

I am working on Visual Studio Code in a codebase with custom classes and when variables are declared using auto, my autocomplete will not work. Here is an example for a function returning a smart pointer to a custom class.

When using auto, I get "No suggestions" enter image description here

If I manually declare the type, it works fine. enter image description here

Is this a known issue? something I can try? Thank you.

3
  • visual studio code, sorry. edited. thank you. Commented Nov 21, 2024 at 12:28
  • how have you configured intellisense? are you using the c++ plugin intellisense or clang? Commented Nov 21, 2024 at 12:41
  • I use C/C++ Intellisense Commented Nov 21, 2024 at 12:53

1 Answer 1

-2

Yes, this is a known problem, unfortunately, when using the auto type, visual studio cannot determine the method fields and their types for a class, as far as I know, the only way to return tooltips is to explicitly indicate the type

Sign up to request clarification or add additional context in comments.

2 Comments

"this is a known problem" - do you have a source for that?
I myself worked in a visual studio and came across it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.