|
Is this an interview question?
|
|
|
|
|
YES
|
|
|
|
|
So, I presume you did not do the interview well. Then why not read up on linked list and learn, rather than insisting on having someone else answer the "same exact question" for you?
BTW, Good luck for your next interview.
|
|
|
|
|
I am assuming that you voted me 1. But my opinion still stands the same. You'll have to do your stuff. People might answer an interview question here, but that kinda defeats the purpose; your thought process will stop there. If you don't learn things properly and experiment enough on them, you'll never be able to master it. And without mastering it, you won't be able to answer a tricky question.
Thanks for the 1 vote, I am not the loser here; I couldn't care less.
|
|
|
|
|
Anything is possible, especially if you are the author of said list (i.e., your linked list object can keep track of what it perceives as the middle node). While it's common to hold a pointer to the front and back nodes of the list, by their nature, however, a linked list implies iteration.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
Please tell me answer of this question.
How can i know a software or application is run or install on any computer at first time?
i want if my application is run on any computer firstime than it shows an message and create a user,after this it works normally.
this process is done only at once when application run first time on computer.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
modified on Wednesday, July 23, 2008 2:17 AM
|
|
|
|
|
you can do this a few ways.
You can check to see if either a file exists in A) a user directory, B) within the executable itself, or C) within the registry. If the file doesn't exist, then create it.
By doing this you can tell whether or not the program has been run before, because the next time you check for the file, it will be there (unless the user has removed it) but this is unlikely if you create the file within the executable.
|
|
|
|
|
Can show any example of this.
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Your Post.[^]
Looks like you've already found your answer
|
|
|
|
|
You can use Registry values for it. The installer can write approbiate HKLM values. And the run state makes more sense per user -> HKCU.
Greetings from Germany
|
|
|
|
|
"_$h@nky_" wrote: i want if my application is run on any computer firstime than it shows an message and create a user,after this it works normally.
So wouldn't the presence of said user indicate whether your application has been ran or not?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi Experts,
How can I select the tree item on right click of mouse?
|
|
|
|
|
i want to delete all strings(items) in combobox list
how is that can possible
|
|
|
|
|
"Clear()" use this method to delete all the items in a combo bax
|
|
|
|
|
it is not working
it does not delete deletes all item of combo box
i am using is this way
CComboBox *b=(CComboBox*)GetDlgItem(IDC_PATIENT);
b->Clear();
|
|
|
|
|
The best option i can give is iterate to nuuber of items and remove() individual item.
|
|
|
|
|
ResetContent()
CComboBox *b=(CComboBox*)GetDlgItem(IDC_PATIENT);
b->ResetContent();
|
|
|
|
|
That method clears the current selection, if any, in the edit control of the combo box. How does that help the OP?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
The same way pipes solve the inter-thread communication problem
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi all,
I want to trim a wstring, like "Two words" as "Twowords". How it is possible.
Thanks.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
You have to go through every character in a string and find the space alpha numeric and remove from the
string.
So u need one temp string;
char* pData = Two Roes;
char* tmpData;
while(!pData++) // while string reach to last
{
if(pData != NULL)
tmpData = pData;
}
return pData = tmpData;
|
|
|
|
|
Actually I used isspace() to find all spaces in a wstring. But in that case I have to go through a loop, for each letter of the string. I'm try to avoid it and see any solution on trim.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Trimming usually implies removing from the ends, not the middle.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Ya, that's true. I'm looking that it's possible to trim middle spaces.
And also, I have a similar question. How can I trim a standard string in C++ for the end spaces.
Like this.
"One " trim to "One"
I appreciate your help all the time...
CodingLover
|
|
|
|
|
CodingLover wrote: How can I trim a standard string in C++ for the end spaces.
See here.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|