string-literals
C++: Constructor accepting only a string literal
Is it possible to create a constructor (or function signature, for that matter) that only accepts a string literal, but not an e.g. char const *?[详细]
2022-12-16 13:30 分类:问答What does assigning a literal string to an NSString with "=" actually do?
What does the following line actuall开发者_JS百科y do? string = @\"Some text\"; Assuming that \"string\" is declared thusly in the header:[详细]
2022-12-16 09:38 分类:问答(c/c++) do copies of string literals share memory in TEXT section?
If I call a function like myObj.setType(\"fluid\"); many times in a program, how many copies of the literal \"fluid\" are saved in memory? Can the compiler recognize that this literal is already de开发[详细]
2022-12-14 00:26 分类:问答Comparing character arrays and string literals in C++
I have a character array and I\'m trying to figure out if开发者_运维知识库 it matches a string literal, for example:[详细]
2022-12-09 13:21 分类:问答