Although you haven't explained what you are trying to do in that code, I'll try to give you a brief explanation on why you are getting that error.
You are declaring a variable of type long long
and assigning it a value of 1a1b2a2b3a3b4a4b
. Usually, when you assign a value to a variable, you should enter the value in decimal, and as you can see 1a1b2a2b3a3b4a4b
is not decimal.
First of all, compiling with cc in ubuntu, returns the error:
invalid suffix "a1b2a2b3a3b4a4b" on integer constant
Note that the first 1
is not shown.
The compiler expects an integer literal (or integer literal + suffix L for long
) when assigning a value to a variable of type long
. Your problem is that the compiler is understanding the first 1
as an integer literal and a1b2a2b3a3b4a4b
as a suffix. Since this suffix doesn't exist, you get the error.
I assume what you are trying to do is assigning the hexadecimal value 1a1b2a2b3a3b4a4b
to the variable a
. If that's what you are trying to do, you should specify that the value you are entering is in hexadecimal. The way to do that, is to add the 0x
prefix before the value, so it would look like this:
long long a = 0x1a1b2a2b3a3b4a4b;
There's more information on valid integer literals here.
Anyways, there are lots of other mistakes in your code, like assigning a value to what the pointers point to before specifying what the pointers point to.