Char: Difference between revisions
Jump to navigation
Jump to search
Tip:Despite its name, there is no need for char to be used to store character data. It can also be employed simply as a means of storing one byte of data.
mNo edit summary |
Thunder4ik (talk | contribs) m (→See also: Unicodifying) |
||
Line 14: | Line 14: | ||
* <code>[[wchar_t]]</code> | * <code>[[wchar_t]]</code> | ||
[[ | [[Category:Variables]] | ||
[[Category:Glossary]] | [[Category:Glossary]] |
Revision as of 15:03, 7 January 2024
char
is the amount of memory needed to store one ASCII character. On architectures that Source supports, this is one byte or eight bits.
char MyChar = 'T'; // single quote marks

Arrays of char
or wchar_t
are known as strings, and are used to store text. char*
means a pointer to a char, which is almost always the start of a string.