|
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.
|
|
|
|
|
Use GetKeyState(VK_SHIFT) to check if the shift key is down when you catch the other keys.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Wow, that was a fast reply. Thankyou, your suggestion works a treat
|
|
|
|
|
i am using vc++6 MFC and dialogs
i want to connect to my remote mysql database and put the results in a CListView, any example i find uses ODBC, where a window box is poped up and a you have to select a ODBC. can i not just connect directly to the mysql server?
Or if a OBDC has to be used can i hard code one in and how?
thanks
|
|
|
|
|
1. go to mysql.com to download c library, which contains c functions for accessing mysql database and is free.
2. go to your host to add your PC's IP address to mysql database, otherwise you can not access your mysql database.
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
ah right, im am using a mysql wrapper already (MySQLWrapp), was just wondering how to get the data into a CListView. like all the columns and rows. all the examples show how with ODBC
|
|
|
|
|
if u can read records from mysql db, why can't u add them to CListView?
is ur question about mysql or CListView?
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
i think his problem is MFC because he's been asking so manu times about data binding...
see by your eyes[^]...
|
|
|
|
|
I have a CDialog derived class, and want to programmatically close it. I tried:
cd->PostMessage(WM_CLOSE);
where cd is the pointer to the non-modal window. However it doesn'tclose. In the message map of cd's class I put ON_WM_CLOSE()
BEGIN_MESSAGE_MAP(CDlgTimeSeries, CDialog)
ON_WM_CLOSE()
END_MESSAGE_MAP()
What do I need to do to close this cdialog?
thanks,
sb
|
|
|
|
|
call function OnOK() or OnClose().
OnOK() returns IDOK.
OnCancel() returns IDCANCEL.
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|