|
All C/C++ compilers I know of are case sensitive.
Steve
|
|
|
|
|
I have problem on converting UINT8 data type variable to char.
For example,
for the
UNIT8 byte_data_var[6];
char char_data_var[6];
for (int i = 0; i< 6;i++)
byte_data_var[i];--->how to convert to char[i];
Anyone please help me? Thanks la =)
|
|
|
|
|
a UINT8 is basically an unsigned integer, which can take on numbers from 0 to 255. A char is generally a signed integer, which can take on numbers from -128 to 127. As you can see, these types are not compatible in theory, as they're ranges differ quite a lot. What exactly is it that you are trying to accomplish? Printing the data?
--
Pictures[^] from my Japan trip.
|
|
|
|
|
actually i wish to take out the UINT8 variable and then convert it to string or characters so that I could print out the value to display....
|
|
|
|
|
char buf[4];
_snprintf(buf, 3, "%u", unsigned(byte_variable));
printf("buf is %s\n", buf);
|
|
|
|
|
Thank you very much. I will try on it first =)
|
|
|
|
|
Hi, I'm trying to change the font of a popup menu, and I am wondering if that is possible, and how so....I tried to see if there was a SetFont function like there is for Dialog items "GetDlgItem(xxx)->SetFont(&m_Font)" but couldn't find one. Any help would be greatly apperciated.
Thanks
|
|
|
|
|
Another thing to achieve the same effect is that you can use a bitmap image on the menu and set it to any size that you want and any format.
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
|
|
|
|
|
Hi,
cout << "*"<< endl;
and
cout << '* '<
|
|
|
|
|
Well one's outputting a string and the other is outputting a character.
so you could do this:
<br />
std::cout<<"This string"<<std::endl;
but this will surely give you problems:
<br />
std::cout<<'this is invalid'<<std::endl;
I Dream of Absolute Zero
|
|
|
|
|
The first one outputs a asterix because the double quotes denotes a char array, the second one is a little trickier because you are using a single quote to wrap two bytes. That means that the operator << is outputting a short (two bytes) instead of a char (one byte).
Try this
cout << "asdf" << endl;
cout << 'asdf' << endl; and you get the same type of result.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
-- modified at 17:48 Thursday 23rd March, 2006
|
|
|
|
|
Is 'asdf' valid? I thought single quotes only applied to single characters?
|
|
|
|
|
Hi y'all,
I hav created a database MyBBN in SQL server (inbuilt in VC++ 7 using server explorer) with a dataset say BBN and i want to use a column (username) within a table in this dataset as a verifier on a log-on form.
How can i connect to the database or the dataset for that matter?
and how do i check the inputed username from a user against the one in the table.? if sample coding could be provided, it would help a lot. As i mentioned earlier its a managed App in Windows Forms.Net
Thanks for all help in advance...
regards
|
|
|
|
|
Sir
Can anyone help me
How to Capture Atl+Tab combinational Key for my SDI Application?
Thank :-Du
Always Be What you Are.
|
|
|
|
|
GetKeyboardState(...)
A nice hyper tool for optimizing your Microsoft html-help contents.
A best image tool for Windows C++ programmers, don't miss it!.
Includeh10
|
|
|
|
|
WM_SYSKEYDOWN
Nibu thomas
Software Developer
|
|
|
|
|
Hi,
Maybe this is an insane question, but I am confused in understanding about the 'rotating pointers' concept. I am having 2 'ptr16' pointers each pointing to different memory sizes (1200x1050) and (1024x1231) respectively. My actual data is of size 1200x1050, but I have to use another buffer of 1024x1231 as per the requirements of one of our hardware board's specs (must be multiples of 1024). So they (the board techies) suggested me as follows-
"simply use the buffer size you feel comfortable width (that is still a multiple of 1024) and add data to it using source and dest pointers, with the dest pointer wrapping around to the beginning of the FIFO buffer"
where FIFO buffer is of size 1024x1231. Source and dest pointers are of same size (1200x1050). I would like to know the actual meaning of the above sentence
thanks,
-Pav
|
|
|
|
|
Sounds like a ring buffer. You'll find information about such datastructures in any well written book on datastructures and algorithms. Ring buffers are often used rapid communication with hardware, as memory allocations are quite costly in terms of performance. Hence a static buffer (an array basically) is used, upon which one slides two windows on: a window of "used bytes" and a window of "free bytes". It's a smart and easy technique, which I'm sure you'll learn in no time.
--
Pictures[^] from my Japan trip.
|
|
|
|
|
Hi,
Thanks for ur reply. At present i am not having a data structures book with me, it would be great if you can give me a simple example code, so that I can understand the basic technique of implementation. I will try to get a data structures book from my library meanwhile
-Pavan
|
|
|
|
|
|
Thanks for the tutorial.
-Pav
|
|
|
|
|
I own a palm os handheld that is able to beam data back and forth, I recently have been programming on it and testing all the functionalities that it has; but one of the functionalities that I saw was infrared TV frequency tapping, then control. That application is also able to learn the frequency of the TV as well. The problem that I face is that the list of frequency that the application is able to learn is only 4 other frequencies. I would like to create a program that has a larger scan for those frequencies and is able to pick up any frequency over time. Another problem is, I have found nothing on the web that talks about "ways to communicate with a TV using frequencies on you palm". So I’m asking for some help in learning how to communicate with a TV through my palm's infrared!
Thank you.
|
|
|
|
|
For point 2:
Check for a technical specification of a "universal" remote control for a TV, they usually give the frequency and the function associated with it.
~RaGE();
|
|
|
|
|
One more Question.
Is it possible to finger any device that i beam at?
Mainly a way to identify something by its return ir signature!
ie: printer, other palm devices, televisions!
When i say finger i mean to get device name, device type, device *frequency* ext…
Thank you.
|
|
|
|
|
Heres a new question that will probably go unanswered again.
I have a list view on my main Dialog. I am trying to perform actions when the user presses the direction keys. Now the VK_UP and VK_DOWN are left alone, they do the default of moving through the listview items.
I have no problem catching the VK_LEFT and VK_RIGHT, but I want to perform an alternate function when the user hits left or right in combination with VK_SHIFT.
So far everything I have tried has failed. The first problem is I am unable to distinguish between the two types of user input.
if(((LPNMHDR)lParam)->code == LVN_KEYDOWN) {
if(((LPNMLVKEYDOWN)lParam)->wVKey == VK_SHIFT)
break;
data->display_navigate(((LPNMLVKEYDOWN)lParam)->wVKey);
}
the display_navigate() function examins the keycode and performs an action. But it gets called even if the user holds the shift key.
|
|
|
|