cstring
Converting a C-style string to a C++ std::string
What is the best way to c开发者_Go百科onvert a C-style string to a C++ std::string? In the past I\'ve done it using stringstreams. Is there a better way?C++ strings have a constructor that lets you co[详细]
2023-02-05 21:11 分类:问答Can CString::Format() receive const std::string?
Can CString::Format() receive const std::string? Example: void some_func( const std::string a_string 开发者_开发技巧)[详细]
2023-02-05 14:51 分类:问答Strange memory management issues in C++ (from a beginner, at least)
I\'m new to C++, I have lots of Objective-C experience. I\'m trying to have an array of c-strings (that is char **) as an instance variable in my class, which gets allocated and filled in my construc[详细]
2023-02-05 14:28 分类:问答Traversing nested vectors of strings
There\'s an issue in my code with nested vectors of strings. It is not printing the strings. void foo(vector<vector<char const *> > const & vcp){[详细]
2023-02-03 07:24 分类:问答Error converting types in C++
I have a program in which I need to use the Format(); function to combine a string literal and a int into a CString variable. I have tried several different ways of doing this, the code for them is he[详细]
2023-02-03 06:36 分类:问答CString error, 'CString': is not a member of 'ATL::CStringT<BaseType, StringTraits>'
I am trying to do this: #include <atlstr.h> CHAR Filename; // [sp+26Ch] [bp-110h]@1 char v31; // [sp+36Ch] [bp-10h]@1[详细]
2023-02-02 01:10 分类:问答std::map crappy chars only in release mode
I have an std::map as parameter for an function and in Debug Mode (VS2008) the map have the correct keys and values, but when I start the program in Release there are crappy chars in to the map![详细]
2023-01-31 02:24 分类:问答Remove the first part of a C String
I\'m having a lot of trouble figuring this out.I have a C string, and I want to remove the first part of it.Let\'s say its: \"Food,Amount,Calories\".I want to copy out each one of those values, but no[详细]
2023-01-30 19:11 分类:问答Why do I get invalid data in my CString formatted using Format()?
LRESULT CFlashWnd::OnScannerProgress( WPARAM wParam, LPARAM lParam ) { ScannerProgress *pEvent = (ScannerProgress *)wParam;[详细]
2023-01-30 09:37 分类:问答NULL terminated string and its length
I have a legacy code that receives some proprietary, parses it and creates a bunch of static开发者_运维知识库 char arrays (embedded in class representing the message), to represent NULL strings. After[详细]
2023-01-29 12:40 分类:问答