Is it OK to use this in C++ to access members in the same class?

Asked 2 years ago, Updated 2 years ago, 35 views

I am currently using DxLib in C++ to create a simple game.
When accessing other member functions and member variables in the same class from member functions in the class, this->m_X, but looking at the open source, it seems that there are few codes using this.
Does this reduce processing speed and productivity?I look forward to hearing from you.

c++

2022-09-30 16:23

1 Answers

The execution processing speed remains the same.The compilation processing speed may change slightly.Productivity depends on the editor, but will the number of types increase by 6 characters?

It doesn't matter so much that neither of them has even been mentioned.


2022-09-30 16:23

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.