|
This is a strange question. DLLs export functions, so I guess you're asking how to make a DLL that exports the function? I suggest you read up on DLLs.
Steve
|
|
|
|
|
Sorry... this is my problem... I have no experience in C++ although I understand the logic in this feature... but I want to write it in VB.net. Instead of thinking how all the Windows libraries that work similarly like C++. I was thinking of compile this C++ project into DLL so that I can import the DLL in my VB.net. Unfortunately, it doesn't work that way.
Or, you guys as experts... got any idea what should I do with this? Thanks
|
|
|
|
|
|
Hi,
I faced few interview questions in C++. I'm new to C++. Please let me know the answers for the below questions.
* Whats the lookup plan for hash table and linkedlist
* Use of Red-Black Tree
* which datastructure is preferrable to store name, address and phone values
* How mutex works internally
Thanks in advance
modified on Monday, December 20, 2010 6:58 AM
|
|
|
|
|
Rather than asking someone to give you answers to pass your interview, you would do better to buy a book on C++ and learn it before attempting such an interview.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Some brief answers...
1. Hash tables can look up items very quickly, at the cost of more space and a fixed size. This is their main advantage. A linked list is good for unknown amounts of data; it grows as you add more data. Lookup requires going though (on the average) half the list, so is generally slow.
2. A red-black tree uses one extra bit of storage per node to avoid the worst-case binary trees (skewed). (A scapegoat tree accomplishes this without the 1-bit overhead per node.)
3. A class.
4. All mutual-exclusion mechanisms ultimately depend on an atomic test-and-set operation, which determines if another thread is accessing a critical resource, and sets a flag at the same time if the resource is free. This must be done by hardware; if this capability isn't available, no pure-software solution will be able to provide mutual exclusion.
|
|
|
|
|
Thanks alot Alan. Is a class of type datastructure?
|
|
|
|
|
HaroldVish wrote: Is a class of type datastructure?
It's more of a fancy struct . See here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
At What Conditions,
CStudioFile::ReadString() Gives/Returns the FALSE value?
I know that,What is available in the MSDN ,
AnyBody Know the another Conditions Please,
Tell me.
And
In a File Consists the Lines In one Condition "m_pString" doesn't take the line in the File?
Why it Happen? Any body know Please give me Reply....
|
|
|
|
|
What make you think there are other condition than what is describe in the documentation ? Do you have a test case that will trigger a FALSE ?
It returns FALSE (or NULL depending on which version you call) if no data is read before the end-of-file.
John502 wrote: In a File Consists the Lines In one Condition "m_pString" doesn't take the line in the File?
What does that mean :
Watched code never compiles.
|
|
|
|
|
Hello Maxi,
Thanks for helping in this regards; I want to run my test case on the below text;
12/13/10 10:11:00 (India Standard Time), [3484] TAPIAdapter.cpp :379 INFO - Closing the database before stopping the service.
12/13/10 10:11:00 (India Standard Time), [3484] TAPIAdapter.cpp :409 INFO - TAPIAdapterDynConfig thread could not be stopped
12/13/10 10:11:00 (India Standard Time), [3484] TAPIAdapter.cpp :429 INFO - "TAPIAdapter Service" Service Stopped
12/13/10 10:11:04 (India Standard Time), [3544] TSPConnector.cpp :166 TRACE - Line is closed for device_id 110
12/13/10 10:11:04 (India Standard Time), [3544] TSPConnector.cpp :166 TRACE - Line is closed for device_id 110
3_VOIP_10202010_00004 made on Oct 20 2010 16:41:29
12/13/10 10:11:00 (India Standard Time), [1508] TAPIAdapter.cpp :793 ERROR - Illegal keyword "CheckExtInCTIUserInterval" in configuration file
12/13/10 10:11:04 (India Standard Time), [1508] CVoipDatabase.cpp :167 INFO - KnoahSoftDB : Connection opened with database at ip address : 157.0.60.155
12/13/10 10:11:04 (India Standard Time), [4108] CCTIOSAdapterKSDB.c :142 TRACE - The SQL Query is :- select v.voip_phone_extension Voip_Phone_Extension,e.emp_code Emp_Code,e.emp_id Emp_ID,e.network_id Network_ID,s.site_alias Site_Alias From Employee E, Site S, Voice_Configuration V, Employee_Detail D Where V.Emp_Id = E.Emp_Id And V.Emp_Id = D.Emp_Id And D.Location_ID = S.Site_ID And V.Status = 'A' And V.Do_Voice_Recording = 'Y' And V.Voip_phone_extension != '-1' and v.emp_id not in (select e.emp_id from employee e where e.emp_first_name like 'extn_agent_%') order by voip_phone_extension
I have this text content in one file and wants to read this by application;
please help me out..
Thanks
John;
|
|
|
|
|
So what is the issue ?
You open the file, read the file line by line with CStdIO::ReadString and do what ever you want with each string :
something like :
CStdioFile myFile(_T("C:\\path\\to\\your\\file.txt"), CFile::modeRead |CFile::typeText );
CString myString;
while (myFile.ReadString( myString ) )
{
std::wcout << myString.GetBuffer() << std::endl;
}
Watched code never compiles.
|
|
|
|
|
|
Watched code never compiles.
|
|
|
|
|
|
Compare what ? the file or the audio ?
With a lot of difficulties.
Good luck.
Watched code never compiles.
|
|
|
|
|
|
With a lot of work and with the help of a Fast Fourier Transformation. (google for that)
And then there is the issue of file formats and sampling rates and all that junk.
Good luck.
Watched code never compiles.
|
|
|
|
|
What do you mean by "compare" exactly ? Your question is totally vague, please clarify. And please describe your question in the body of the message, not in the header.
|
|
|
|
|
I have a large audio file (MP3 and wma). Now I want to find some particular Track (speech) in that audio large files. So How can I compare two Audio files Samples .
|
|
|
|
|
hello Friends
In my application there are too many windows and I want to know the device context(Handle) on which i want to draw mine image.How do I get that device context?
Any Ideas?
Regards
Yogesh
|
|
|
|
|
See here[^].
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
THanks For Reply.
I am not able to use GetDc bcoz my application is multiDoc And am not having handle to the Window as there are too many.And GetDC parameter is Handle to that Window.
I tried FindWindow also to retrieve the handle of Display window but FindWindow returning null.
I am Using VC6.0
Any other Ideas.
Regards
Yogesh
|
|
|
|
|
yogeshs wrote: am not able to use GetDc bcoz my application is multiDoc
Then there is something wrong with your application, multi-document has nothing to do with Windows on the display.
yogeshs wrote: And am not having handle to the Window as there are too many
Sounds like you need to reconsider the design of your application.
yogeshs wrote: tried FindWindow also to retrieve the handle of Display window but FindWindow returning null.
Then you need to use your debugger to find out why it returns NULL. Check the status returned from GetLastError() .
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
All you have to do is call GetDC() as Richard told you. And when you are done, call ReleaseDC() . It really doesn't matter if yours is a multi doc app as every doc (usually) has a window associated with it and GetDC() is related to a window.
|
|
|
|