const tag

11 questions


1 answers
131 views
0
Why do you use the const at the end of the method definition?

Why are you using this?I'm confused class Myclass{public: void print() const {}};

2 years ago

1 answers
147 views
0
How far should I put the const of the function parameter?

How much const should I write?Should I use all the variables that don't change?Even on a single line of code?void printValue(const bool b) { cout << b << endl; }Does writing like this real...

2 years ago

1 answers
114 views
0
Is there no const constant keyword in Python?

How do I specify variables as constants in Python?In Java,public static final String CONST_NAME = Name;I wrote it the same wayConst, Const CONST, Final, Final, Final, and Final are all not allowed in ...

2 years ago

1 answers
119 views
0
The difference between a C++ const reference variable and an ordinary variable

For example, if you have a class called Point, const Point Point::operator+(const Point& a)Wowconst Point Point::operator+(Point a)What's the difference betweenI only know that const Point& is...

2 years ago

1 answers
145 views
0
What's the difference between int * const and const* and int const *?

What's the difference?The pointer is too hard ㅜ

2 years ago

1 answers
157 views
0
Initialize static const string in class

Isn't it okay to initialize the static const member variable within the class?The error message says to initialize out of line.I don't want to use #define but what should I do Static data member of ty...

2 years ago

1 answers
78 views
0
What is the difference between constint*, constint*, and int const*?

const int*const int * constint const * What's the difference between these three?


1 answers
143 views
0
How can I get resource content from static context?

I'd like to read the string in xml. I need a lot from the widget, so can I call getResource and get it without an activity object?


1 answers
118 views
0
To replace std:string with const char* or char*

Please tell me how to change std::string to const charge* or char*

2 years ago

1 answers
116 views
0
C++ Class Internal Type Conversion Question, const indicator

MyString.h (header source)// CMyString class internal instance and method declarationclass CMyString{public: explicit CMyString(const char* paramstr); CMyString(const CMyString &rhs); ~CMyString(v...

2 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.