#include
using namespace std;
Int main ()
{
Char * bi;
Bi="01010101";
Int ten=0, I, j=7;
Char bin [9].
for(i=0; i<8; I++)
{
Bin [I]=* bi++;
If (bin [I]==1)
{
Ten +=pow (2, j);
}
J -;
}
Cout
Want to know how to put the Numbers assigned to * bi, I wrote this bin [I] are the values of the characters' 0 'and' 1 'ASCALL code
There is why I put assigned to a string pointer has the following warning, you can't?
[Warning] deprecated conversion from a string constant to 'char *' [- Wwrite - strings]
CodePudding user response:
Define a const char * bi;CodePudding user response: