c-strings
In C, how can a char* passed to a function be populated with text?
I am trying to create a C function which will return an int, but in the process will populate a char* passed in as a variable. A basic example of what I am trying is:[详细]
2023-02-06 00:57 分类:问答join() or implode() in C
One thing I love about Python and PHP is the ability to make a string from array easily: Python: \', \'.join([\'a\', \'b\', \'c\'])[详细]
2023-02-03 21:10 分类:问答NSString cString is Deprecated. What is the alternative?
I\'ve got another newbie question. I\'ve written a piece of code that converts a NSString to NSMutableData in order to simulate a webService result.[详细]
2023-02-01 07:52 分类:问答Compound/Complex C-String in Xcode/Cocoa
I am creating an SQLite3 program.I am creating the database within the code.I have about 15 columns. Example below:[详细]
2023-01-31 18:43 分类:问答C++ character array allocation error
I have a function designed to get a file\'s contents: bool getFileContents(std::string loc, std::string &code) {[详细]
2023-01-28 03:01 分类:问答Heap corruption when deleting a string
Here is my code: std::string readString() { int strLen = Read<int>(); char* rawString = new char[strLen];[详细]
2023-01-26 07:40 分类:问答Accessing/modifying an array of strings in a structure
Supp开发者_运维技巧ose I have the following code: typedef struct { char **p; } STRUCT; int main() { STRUCT s;[详细]
2023-01-21 16:59 分类:问答Determine #defined string length at compile time
I have a C-program (an Apache module, i.e. the program runs often), which is going to write() a 0-terminated string over a socket, so I need to know its length.[详细]
2023-01-21 09:56 分类:问答How can I tell if CString allocates memory on the heap or stack?
How can I tell if the MFC CString allocates memory on the heap or stack?I am compiling for the Windows Mobile/Windows CE platform.[详细]
2022-12-31 08:52 分类:问答How to setup RAM disk drive using python or WMI?
The background of my question is associated with Tesseract, the free OCR engine (1985-1995 by HP, now hosting in Google). It specifically requires an input file and an output file; the argument only t[详细]
2022-12-28 10:59 分类:问答