TextBox exercise part III lesson 6 will not compile in Visual Studio Community 2022

Doing the exercise at the end of the video, the “this” keyword is used in the solution. I could not get that to compile in VSC2022. *this didn’t either.

Compiler would throw error sometimes “cannot use this in a static function”; other times would compile but not show a value in cout.

Strange.

To fix this had to use theValue and value = theValue as shown earlier in the lesson–this worked everytime. Can anyone else duplicate this issue.

Disregard. Carefully followed code examples by painstakingly trying to type them ins VS2022–REALLY hard to do, since you can only see a tiny fraction of the code written in the class as example in a small Youtube like window (how come there are no freaking source files available?? Summary section only shows code fragments! Anyway, after doing that for like 2 hours, this-> works again so I must have made a typo somewhere.

I have a similar problem, I found a typo and fixed it, it shows no errors and compiles but the string does not write to the console. Any ideas why?

Post your code with said issue.

After looking through a bunch, I think I somehow removed “= value” from “this->value = value;”, I got it working correctly now I suppose. Super silly.