I need to save a combination of 30 letters, but each letter can only be "0", "1" or "2". When I use sizeof (myString), it returns 32.
I want to use this 30 letter combination to access an array string, so I wonder if it is possible to use 3 bool values of any type to store 1 out of 3 values.
3 ^ 30 = 205891132094649 (~ 2E14), which is less than the maximum value of a 64-bit integer (~ 2E19), so you can match strings with 64-bit ints 1: 1.
-3, . 4, ( /), , 4 ^ 30 2 ^ 64.
C ++ ( , ) - char. bool char, . , - . - , .
char
bool
Boost tri-bool 3- , . 2- , 64 , .
Source: https://habr.com/ru/post/1747688/More articles:Call import in module - pythonПочему мой метод класса не отображается, когда я реализую интерфейс в своем классе? - c#Python: проблемы с YACC - pythonHibernation objects stored as HttpSession attribute values - javaJava: writing a file using finalize method - javajquery: я должен использовать parseInt(), даже когда дело касается чисел, почему? - javascriptUser account design and security - designWinForm Plugin System - c #Writing a script to bypass college login page - pythonHow to output JSON columns in jQuery - jsonAll Articles