|
gvanto wrote: exit(0) was only to exit from a main routine or something
No, it exits the current process - of course, which process is 'current' can get confusing with *nix, as the fork function creates a new process by duplicating the caller, so you have to track the two code paths, the parent process (where fork returns the child PID) and the child process (wehere fork returns zero).
In some ways it's easier to work with than Win32's CreateProcess , in other ways not.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Ah ic, yeah that's what kind of got me I think. Not quite got the hang of these socket processes (and I'm pretty new to C++)
so still got a way to go. and a loooooooooong way before I start coding c++ in windows !
Thanks again for the help Stuart, much appreciated !
Best,
gvanto
|
|
|
|
|
hi all,
can anybody help me build an application having multilingual support using VC++.
thanks!!
Varun Bhatt
|
|
|
|
|
Check this[^]
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Thanks a lot Sarath,
but i had already tried this and lots of other examples on code project and codeguru.com and on various other sites but not really useful to get an clear idea about how to do this.
THough, now i have an obscure idea about the steps but can you tell me the stepwise procedure to proceed. i was trying the following example
ddj.com/184404314?pgno=1
but atlast it resulted the following error
d:\varun\mltest\mltest\mltest.h(10) : fatal error C1083: Cannot open include file: 'MLDLL\resource.h': No such file or directory
MLTestDlg.cpp
d:\varun\mltest\mltest\mltest.h(10) : fatal error C1083: Cannot open include file: 'MLDLL\resource.h': No such file or directory
i have tried a lot to solve this but failed, can you suggest any solution?
Varun Bhatt
|
|
|
|
|
Get the ML directory and files for your project and put it under current path of the workspace or in any include paths and compile.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
|
Hi All,
---------------------
| | |
| | |
---------------------
| | |
| | |
---------------------
I need a splitter window (4 way) as shown above. I use the code
m_wndSplitter.CreateStatic(this, 1, 2));
m_wndSplitter1.CreateStatic(&m_wndSplitter,2,1,WS_CHILD |WS_VISIBLE, m_wndSplitter.IdFromRowCol (0, 0));
m_wndSplitter1.CreateView(0, 0, RUNTIME_CLASS(CLabel), CSize(250, 15), pContext) ;
m_wndSplitter1.CreateView(1, 0, RUNTIME_CLASS(CLView), CSize(250, 500), pContext) ;
m_wndSplitter2.CreateStatic(&m_wndSplitter,2,1,WS_CHILD |WS_VISIBLE, m_wndSplitter.IdFromRowCol (0, 1));
m_wndSplitter2.CreateView(0, 0, RUNTIME_CLASS(CLabel), CSize(250, 15), pContext) ;
m_wndSplitter2.CreateView(1, 0, RUNTIME_CLASS(CLView), CSize(250, 500), pContext) ;
But i got this
---------------------
|| |
|| |
---------------------
|| |
|| |
---------------------
I know that m_wndSplitter.CreateStatic(this, 2, 2));
is possible for this 4 way splittering.
But here wndSplitter1 & wndSplitter2 are the object of different splitter classes
Help me..
|
|
|
|
|
You have to call m_wndSplitter.CreateView before calling .CreateStatic on the other splitters even though you will never use those views.
«_Superman_»
|
|
|
|
|
Wow!! it works well.Thank u very much
|
|
|
|
|
Dears,
I have a doubt about the type casting in CString and LPCTSTR.
Please see the below code.
void FnWithArgs( LPCTSTR lpctstrBuffer )
{
// Do nothing;
}
void FnTest()
{
CString csBuffer;
FnWithArgs( csBuffer.operator LPCTSTR()); // Casting-1
FnWithArgs( static_cast<<LPCTSTR>>( csBuffer )); // Casting-2
}
In the code we can see that two casting methods are done.
My doubt is that which of the above ( Casting-1 or Casting-2 ) is better?
Actually I need the reason also.
Regards,
Krishnakumar
|
|
|
|
|
They are the same. Casting-2 will internally be converted to Casting-1 before execution.
«_Superman_»
|
|
|
|
|
«_Superman_» wrote: They are the same. Casting-2 will internally be converted to Casting-1 before execution.
Which one I can prefer?
Casting-1?
|
|
|
|
|
Casting-2 is the standard.
So go with that.
«_Superman_»
|
|
|
|
|
Thanks...
Regards,
Krishnakumar
|
|
|
|
|
I think it's not necessary to type cast because the operator LPCTSTR() is not explicit. Just directly pass it.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
hi, i have been trying to create a sqlite database using visual c++.
I'm getting an unfamiliar error message box while the program execute insert sql statement.I have posted the error message below. Please help me to solve this problem.
Thank you.
---------------------------------------------------------------------------------------------------------
Unhandled exception at 0x00000000 in sparta1.exe: 0xC0000005: Access violation reading location 0x000000v00.
the error message also have a break,continue and ignore button below the message box.
---------------------------------------------------------------------------------------------------------
|
|
|
|
|
This is an informative message meaning that there was some exception (in lay mans term, it's like a malfunction) that was not handled in the code. The second chance exception does not really mean that there may be an error only in your code. Usually the code 0xc0000005 indicates a second chance exception. Did you try and debug your code to check the cause of the problem?
Are you aware of what exceptions are and why do they arise?
If not, go and read about exception to better understand the problem and then try to resolve it.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
modified on Thursday, February 12, 2009 12:25 AM
|
|
|
|
|
Check all your pointers for errors.
This error is likely to be an uninitialized pointer or a pointer holding a wrong address.
«_Superman_»
|
|
|
|
|
vanishaa wrote: I'm getting an unfamiliar error message box
Wow, if it's unfamiliar tp you, either you are very new to programming or you were programming quite good from the begining. Because I remember when I started programming, I got this kind of message a looooot of times.
Anyway, as other have suggested, this error is because you are trying to read a bad pointer. Use your debugger to locate the problem and use breakpoints before the crash to check if all your variables are initialized properly.
|
|
|
|
|
Hi All
How can i remove duplicate item from list control?I have a list control report view which have 100 data.I want to reomve duplicate data(data which is present more than one time in list control).Plz help me
|
|
|
|
|
How about comparing the items in the list control and checking if a copy of it exists?
If affirmative, use CListCtrl::DeleteItem...
Is your problem with the comparison part of the items or the removal of copies of data?
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Thanks for reply
i have problem with the comparison part of the items .Can you give me some example .Plz help me
|
|
|
|
|
Start with two loops.
In the first loop pick an item from the list using GetItemData
In the second loop [inside the first loop] iterate through all the items in the list and compare the data for each item with the item of the first loop..
If it's a match mark the item for deletion and delete it using DeleteItem API
You do this until you finish comparison of all the items in the list control.
By the way, it would be better to maintain a vector of items and compare them before inserting them in the list.
Using a map, you can make sure that the items are unique.The value of the key is unique and is used to order the data automatically
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
You will have to write a code to compare items and remove from the list if duplicate found as thr is no inbuild method provided to do so, and its not too hard.
|
|
|
|