char
How I replace multiple chars with only one char in a simple way?
I want to replace some chars with a开发者_开发百科ccents in a String like this example: str.replace(\'á\',\'a\');[详细]
2023-03-26 09:48 分类:问答.NET Enum base type of Char
According to msdn Enums cannot have a base type of char. Why can enums not have a base type of char? Also why does microsoft strongly recommend that an enum contain a constant with a value of 0开发者_[详细]
2023-03-25 23:24 分类:问答C++: Correct implementation for passing a std::string to a C function that wants to change the string?
I have a function in a third-party library written in C: char* fix_filename_slashes(char* path). This function expects a mutable C-string passed to it so it can change all the slashes in the path to t[详细]
2023-03-25 00:26 分类:问答Is there a fixed length version of MySQL's CHAR data type that can store more than 255 characters?
I know about VARCHAR, TEXT, etc. but I\'m hoping for something that has a fixed width because I value the boost in efficiency, even if it\'s minor. I can\'t seem to find anything in the documentation,[详细]
2023-03-24 22:46 分类:问答Passing user input to function with char* parameters
I get the following errors with my code. cannot convert parameter 1 from \'std::string\' to \'char * no operator found which takes a right-hand operand of type \'c开发者_Python百科onst char *[详细]
2023-03-24 18:01 分类:问答Nested brackets/chars '(' and ')' in grammar/ANTLRWorks warning: Decision can match input such as ... using multiple alternatives
The grammar below parses ( left part = right part # comment ), # comment is optional. Two questions: Sometimes warning (ANTLRWorks 1.4.2):[详细]
2023-03-23 22:49 分类:问答Replacing multiple chars at the same time
So in my code I have a series of chars which I want to replace with random data. Since rand can replace ints, I figured I could save some time by replacing four chars at once instead of one at a time.[详细]
2023-03-23 17:28 分类:问答Why does this char array Seg Fault
Can anyone explain to me why when initializing a char array, if the array size is left blank, like this[详细]
2023-03-23 17:01 分类:问答Is there a way to prove integral promotion to int?
In pure ansi C, is there any way to show that, given char c1 = 1, c2 = 2; the type of the following: c1 + c2[详细]
2023-03-23 16:35 分类:问答how to efficiently parse a string in c
I have: char *str = \"abc defabcdef ghixyz\"; I want to assign const char *a = \"abc\"; const char *b = \"def\";[详细]
2023-03-23 13:04 分类:问答