string test1(string &str1){
string str1=”hello1″;
return str1;
}
As shown in the above code, the exception of declaration of ‘STD:: string STR1’ shadows a parameter will be reported when compiling. The reason for the exception is the naming conflict between & amp; STR1 and STR1.
Read More:
- Error C2664 in C + + compilation: cannot convert parameter 2 from “const char [5]” to “lpctstr” solution.
- JS exception capture: the usage and example analysis of onerror() in window
- java.lang.IllegalStateException Exception: cause analysis and solution
- C#: Analysis of the difference between write() and writeline()
- C / C + + error handling (document): unhandled exception: 0xc0000005: access violation while reading location 0x00000000
- R language – error analysis – error in Call.graphics (C_ palette2, .Call(C_ palette2, NULL)) : invalid graphics state
- Solve the problem of forward parameter req and resp parameter error
- C language write() function analysis: write failed bad address
- When C language refers to a user-defined type as a parameter, an error segmentation fault is reported
- Analysis of the causes of errors in G + + compilation “was not declared in this scope”“
- The solution of a Java exception has occurred. And error exception in thread when eclipse runs
- Realize the simplest recursive call, simulate exception in thread “main” java.lang.stackoverflowerror exception
- Analysis of [error code [942], ora-00942 in synchronization of DDL statements in ogg
- Analysis and solution of common errors in ArcEngine development
- Max must be larger than min in range parameter
- Error analysis of multiple linear regression in R language model.frame.default
- DB2 sql5005c system exception
- Analysis of compilation errors of “error conflicting types for function”
- Solve the problem of error: cannot pass objects of non trivially copyable type ‘STD:: String’ in C / C + +
- Idea error: error in method comment @ param parameter