I have a class with a private char str[256];
and for it I have an explicit constructor:
explicit myClass(char *func)
{
strcpy(str,func);
}
I call it as:
myClass obj("example");
When I compile this I get the following warning:
deprecated conversion from string constant to 'char*'
Why is this happening?
Your Answer
0 answers
Hot tools Tags
Hot Questions
MySQL error: key specification without a key length
2025-12-31 15:22:11
HashMap: One Key, multiple Values
2025-12-31 15:01:25
What is relationship between goroutine and thread in kernel and user state
2025-12-31 14:43:06
HTTP Error 500.30 - ANCM In-Process Start Failure
2025-12-31 14:22:09
SQL Transpose Rows as Columns
2025-12-31 14:01:54
Popular tool
vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation
VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library
PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment
VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library
SublimeText3 Chinese version
Chinese version, very easy to use
Hot Topics
Douyin level price list 1-75
20416
7
20416
7
wifi shows no ip assigned
13574
4
13574
4






