|
ok, and tell me where you ask C question on CP elsewhere that this board ?
|
|
|
|
|
I'd say the soapbox
|
|
|
|
|
Jonathan [Darka] wrote: I'd say the soapbox
The SoapBox is for VB... Sorry
|
|
|
|
|
There is such a place: http//cboard.cprogramming.com --- Purely 'C'.
John P.
|
|
|
|
|
toxcct wrote: ok, and tell me where you ask C question on CP elsewhere that this board ?
CP means Codeproject.
|
|
|
|
|
ya coding in c++ VS2003.
manu
|
|
|
|
|
manu_2205 wrote: c++ VS2003
Why on earth would you need calloc , then?
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
It may be a legacy product that has been ported to the new compiler.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: It may be a legacy product that has been ported to the new compiler.
He would have told us that, right?
But then, if he would have been really interested in help, he would have given us enough information to help him!
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
jhwurmbach wrote: He would have told us that, right?
Not necessarily.
jhwurmbach wrote: But then, if he would have been really interested in help, he would have given us enough information to help him!
You are making assumptions. Plenty of folks may genuinely want help but may not know how to properly ask for it. The same can be said for folks that may genuinely want to provide help but may not know how to properly do it.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
then what the hell is a calloc() call doing on a C++ code ?
C++ deprecates the use of C memory management such as malloc, calloc, realloc and free.
instead, you have to use new and delete, and you MUSTN'T miw the two ways together !!!
|
|
|
|
|
It may be that you want to much memory so the working set memory is fully used. There is a compiler option to tweak it, but i dont know which.
Greetings from Germany
|
|
|
|
|
Can you show code, that is failing ?
|
|
|
|
|
|
toxcct wrote: has nothing to do in a C++ code.
Yes, But interesting to see, why he is facing problem.
Strange that people expect help without giving sufficient information.
|
|
|
|
|
Sometimes I wonder why you are a CP MVP.
I work with a large amount of legacy C code that use malloc/calloc/realloc/free I cannot, will not change that because it works and has been working for the last few years.
The question is valid, albeit not well "asked", in this forum.
|
|
|
|
|
There could be any nuber of reason why calloc() would fail. At the point of failure, what values are being passed to it?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
If it returns NULL , it is a failure, like an out-of-memory or out-of-address-space condition. If it returns a non-NULL value, but things crash when you try to use it (i.e. it is truly invalid), then I would offer that the heap information used by calloc(...) is messed up,or you are going too far with the pointer returned.
Although, since calloc(...) has to actually touch the memory to initialize it to zero, it should crash within the call to calloc(...) if the memory it allocated is really invalid.
So, what do you mean by "returns bad pointer"?
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
I'm trying to make a window class for my own context menus. (Like QPopup)
The problem is that this window should get focus without activation. (Parent window shouldn't lose activation)... May be anyone know how to do this?
|
|
|
|
|
I have created a VC++ application. I want to create a setup of the project (exe and supporting files). How to do with Package and deployment wizard or any other wizard.
Thanks in advance.
|
|
|
|
|
|
|
Hi
Can we all API used in VC++6.0 in VC++.Net. If we have open old project of VC++ 6.0 to VC++.Net then what changes are necessary to run that project sucessfully
Atool
|
|
|
|
|
M. Atul wrote: Can we all API used in VC++6.0 in VC++.Net.
Naturally
M. Atul wrote: If we have open old project of VC++ 6.0 to VC++.Net then what changes are necessary to run that project sucessfully
Depends how good the programmer was. You may need no changes, you may need a lot. VC6 was a poor C++ implimentationm only coders who know the standard and coded to it would have no issues.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Are you talking about converting to VC8 with MFC, or converting to the CLR with Forms?
If you're talking about going to VC8 with MFC, it might take a couple of hours, depending on a) how large the code base is, and b) how talented the programmer doing the conversion is.
If you're talking about going to CLR/Forms, I think it would be best to just start from scratch.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|