0
define variable
I want to define variable, for example I use byte, it should be 1 byte and it will be like normal number but in binary so only 0 ana 1, it can be for example 0, 10,011 or 10010.In code it will looks like int ... bit a=0; ...
20 Respostas
+ 1
can be + redefined?
+ 1
ok,thanks
0
actually no, C doesn't support binary literals.
But you can use hex decimal instead like const int 0x55ab;
0
i mean it like integer but only in digital(or octal/hexadecimal), then when i would write byte x = 10010 + 1010; x will be 11100, operators will be defined with #define but my question is how to make my own variable with it's name and characters
0
to explain i'll write it in hexadecimal,it will be like
typedef char hex;
it could be only 0,1,2...D,E,F and others characters will cause error
0
yes
0
and do you know hot to do it using libraries?
0
c or c++
0
so it will be better just let it be string and use #define to define operators
0
...
int number,number2;
char character;
cin<<number<<character<<number2<<endl;
if(character==43){number = plus(number,number2);}
...
43 is +
0
where can i learn creating library?
0
i mean it that i don't know about any useful website where i can learn anything