So the above one gives ARGB values in ARGB8888 format, where TempColor is in APRG1555 ?
Type: Posts; User: TheDeveloper
So the above one gives ARGB values in ARGB8888 format, where TempColor is in APRG1555 ?
I use the following to convert from ARGB1555 to ARGB8888
TempColor = ((pColor->Value.argb.B & 0xF8) << 7) |
((pColor->Value.argb.G & 0xF8) << 2) |
...
so this one works fine ?
cant i do it without sprintf ?
function(R, G, B)
{
char a[10];
u_int32 color;
sprintf(a, "FF%02x%02x%02x", R, G, B);
Yes sprintf works if I need to store the formatted text in char. But my requirement is all about to store the hex values in int32. can anyone tell me how to do it ?
char color[10];
...
thanks for your reply
OK, how to get the final value into variable
Say Input is
a = {255, 0, 0. 0} which is in the format a ={a, r, g, b}
printf("%02x%02x%02x\n", r, g, b);
Please anyone tell me how to convert array to hexadecimal variable
Input:
a = {255, 0, 0, 0 }
I need output as
a = FF000000
Thanks for your quick response.
Yes there may be different ways for checking CRC but all those ways should produce unique results right ?
I am working with CRC and finding two different solution for it, where I am getting different values for two different solutions.
Please anyone explain me the differences.
First set of values:...
Yes it works, thanks a lot.
Thanks a lot for your reply but my case is different here
I will have " and " in the start and end of the string.
for example :
Input : "Word"
Output : Word
I need to remove these " and "...
Is there any function in C to remove a character from a word ?
can you anyone explain me how to convert buffer data to an file ?
I need source code for few C games.
Please tell me where can I get the code from ?
Direct links are appreciated.
Thanks
main()
{
printf("%d",i);
sum();
printf("%d",i);
}
static int i;
sum(void);
thanks for your answer
#include<stdio.h>
#include<conio.h>
void main()
{
unsigned max,min;
min = 0;
clrscr();
can someone explain what exactly this code does?
Any luck that the values can be displayed using bitwise operator?
thanks in advance
can you please explain me with sample code to retrieve that data from limits.h ?
thanks in advance
thanks for the quick answer
If there any way to find print minimum and maximum value accupied by different data types ?
say for example
"int" ranges between "-32,768 -> +32,767"
I want to write a c program to display list of data types and their corresponsing memory allocation size
There is any keyword in C which prints that "int" occupies "16" bits or such a kind of code...