Hello everyone,
I heard Java code can be compiled together with Java virtual machine, that is the compiled byte code has a "virtual machine" in it, so that it can be run in a computer where there is no Java runtime installed. If so, I'd like to know how to do it. Can someone give me...
Thanks to you for your comments and time.
For part one, ClassA needs to check memory release in its destructor - it is clear now;
For part two, I saw "placement" operator new concept, and I was wondering what's its effect on memory allocation.
Thanks again,
Jianhua
Thanks for your comments, Matt.
For part one, I got the idea from your comment; for part 2, your way is more elegant. I am still wondering if I overloaded 'new' that way, what would happen with memory allocation in heap.
regards,
Jianhua
Hello everyone,
I have questions concerned with 'dynamic memory allocation' using C++ operators new and delete. I did search questions posted in this forum about 'dynamic memory allocation', but I found few questions talking about this and no answer to my questions. So I think I may need to...
Hello everyone,
I have questions concerned with 'dynamic memory allocation' using C++ operators new and delete. I did search questions posted in this forum about 'dynamic memory allocation', but I found few questions talking about this and no answer to my questions. So I think I may need to...
Thanks for everyone's comments.
This morning I got a reply from a nice guy (Microsoft: Visual C++ forum) saying that
when using templates, one should write implementation in the same file, otherwise compilator can't find implementation of methods.
I did use template classes, and my code is as...
Hi Thierry,
Thank you for your comments.
I listed the code here for your checking (if it does not trouble you a lot).
Thanks again.
Jian Hua
=====================================
My Sorter.h is as follows:
// Sorter.h
#if !defined(TSORTER_INCLUDED_)
#define TSORTER_INCLUDED_
#if _MSC_VER...
Hello everyone,
I'm back from my holiday and I thank you for your reply.
I read the replies from JohnFill, Zyrenthian and Andyrau, and ensured Sorter.cpp was added to my project, also I had #include "stdafx.h" in Sorter.cpp. However it still doesn't work. Maybe I didn't get the...
Hi all,
I inserted a Sorter class (quick sort algorithm helper class) into my MFC
project as a generic class (other than MFC class), then I got two files
Sort.h and Sort.cpp; The project can be compiled, but it has problem
with linking --- the error message is something looks like...
Hi all,
I inserted a Sorter class (quick sort algorithm helper class) into my MFC project as a generic class (other than MFC class), then I got two files Sort.h and Sort.cpp; The project can be compiled, but it has problem with linking --- the error message is something looks like...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.