The error is as follows:

![]()
Error cause:
There’s a section in the program called cout <; < string; //char string[] But didn't notice that string can also be NULL, This leads to errors. Error analysis: When string is a null pointer, cout calls strlen to get the length of the string before printing it. So you need to access the null pointer (that is, the memory address of 0), and once the program accesses this memory, the system raises an exception, thus reporting an error.

Error cause:
There’s a section in the program called cout <; < string; //char string[] But didn't notice that string can also be NULL, This leads to errors. Error analysis: When string is a null pointer, cout calls strlen to get the length of the string before printing it. So you need to access the null pointer (that is, the memory address of 0), and once the program accesses this memory, the system raises an exception, thus reporting an error.
Read More:
- error: `cout’ was not declared in this scope
- “Error: ` cout ‘was not declared in this scope”
- C / C + + rounding function ceil(), floor ()
- Problem solving – vs debugging window flash solution
- VS2010 debugging window flash solution
- Format control of cout cout.width () and cout.fill ()
- soap security negotiation failed
- The solution of console flash in C + +
- Unhandled exception at 0x00000000: 0xc0000005: access violation at position 0x0000000000
- C++:error C2228: left of ‘.str’ must have class/struct/union
- Various errors (c + +)
- Remove array duplicate elements
- SFINAE of C++ idioms
- 1143 Lowest Common Ancestor
- error C2065: ‘cout’ : undeclared identifier
- Collect2.exe: error: LD returned 5 exit status solution
- Reverse function: reverses container contents
- The usage and difference of atoi() and stoi() functions in C + +
- C++ error: jump to case label crosses initialization
- C++ foundation — clear/erase/pop of string class_back