About 8,620,000 results
Open links in new tab
  1. c++ - What is a char*? - Stack Overflow

    Jun 14, 2022 · The char type can only represent a single character. When you have a sequence of characters, they are piled next to each other in memory, and the location of the first character in that …

  2. c++ - 'static const' vs. '#define' - Stack Overflow

    Oct 28, 2009 · Is it better to use static const variables than #define preprocessor? Or does it maybe depend on the context? What are advantages/disadvantages for each method?

  3. What is the advantage of uint8_t over unsigned char?

    Nov 12, 2009 · What is the advantage of using uint8_t over unsigned char in C? I know that on almost every system uint8_t is just a typedef for unsigned char, so why use it?

  4. How do you declare string constants in C? - Stack Overflow

    Aug 15, 2012 · The compile time string concatenation almost selled me on using #define s for strings but I'll stick to const char* for type safety using static where applicable.

  5. What is char ** in C? - Stack Overflow

    Nov 13, 2012 · Technically, the char* is not an array, but a pointer to a char. Similarly, char** is a pointer to a char*. Making it a pointer to a pointer to a char. C and C++ both define arrays behind-the-scenes …

  6. c++ - What does char * mean - Stack Overflow

    Dec 23, 2011 · This is a pointer to a char type. For example, this function can take the address of a char and modify the char, or a copy of a pointer, which points to an string. Here's what I mean:

  7. gcc - Where are the 'int' and 'char' types defined in the C programming ...

    Aug 11, 2017 · The char and int types, among others, are not defined in any header file. They are built in types, meaning they are part of the core language. Their definitions are hardcoded into the compiler …

  8. How to #define a character in C++ - Stack Overflow

    Jan 31, 2016 · I need to define a character in C++. Right now I have: #define ENQ (char)5 Is there a way to define a character similar to how you can define a long using the l suffix (e.g. 5l)?

  9. C char array initialization: what happens if there are less characters ...

    char buf [10] = ' '; will give you a 10-character array with the first char being the space '\040' and the rest being NUL, i.e., '\0'. When an array is declared and defined with an initializer, the array elements (if …

  10. c++ - What is an unsigned char? - Stack Overflow

    Sep 17, 2008 · Just use char if you intend to represent characters from strings, as this will match what your platform puts in the string. The difference between signed char and unsigned char is as you'd …