Recently, we are doing the analysis of the text file of prototext: the main reference code is: https://github.com/HoboChen/hoboprototxt
In the process of drawing a cat according to a tiger, some mistakes occurred. The record is as follows:
Errors in use:
1.error: no matching function for call to ‘std::basic_ ifstream<char>::open(const string&)’t.open(fileN)
Solution: Reference: https://stackoverflow.com/questions/43105655/no-matching-call-function-error-for-fstream
This mainly means that when the open function is used, the parameter type specified by the function is const char *, but a string type parameter is passed in the process of using it. At this time, the string type parameter needs to be converted to the parameter type required by open. A method proposed in the reference is to use C_ str();
Read More:
- C / C + + error handling (document): unhandled exception: 0xc0000005: access violation while reading location 0x00000000
- C + + programming fault handling — error: assignment of read only data member ‘STD:: pair
- How to use C + + function pointer array
- C++ cin.ignore Use of ()
- HYDU_ create_ Process (. /utils/launch/launch.c:69): execvp error on file.. Error handling
- The use of C + + template function and lambda expression
- C language string processing error warning, c4996, sprintf, predicted, c4996, strcpy, c4996, strcat
- use cin.get () instead of system (“pause”) to avoid the flash of C + + programs
- 【.Net Core】using declarations‘ is not available in C# 7.3. Please use language version 8.0 or greate
- C#: How to Use Httpclient to upload files with other parameters
- How to use it RegAsm.exe Register C in a development / production environment#/ VB.NET Developed DLL
- How to use C # to get image format without system. Drawing. Common
- [Solved] Logon failed, use ctrl+c to cancel basic credential prompt. unable to access
- error C4996: ‘inet_addr‘: Use inet_pton() or InetPton() instead or define _WINSOCK_D
- The use of Chinese characters in Qt and the solution to the “error C2001: newline in constant” problem
- C ා use math.net Read. Mat file, file content is complex
- error C1189: #error : Please use the /MD switch for _ Afxdll builds — solutions
- Differences between length() size() and C strlen() of C + + string member functions
- Solve the problem of error: cannot pass objects of non trivially copyable type ‘STD:: String’ in C / C + +
- Exception handling of httpmessage notwritableexception in springboot