AFAIK stack and heap is not associated to any objects. The stack memory is allocated while we creates a thread. The default stack and heap size is 1 MB. You can specify the stack size while creating a thread/fork. If you are building an EXE, you can set the size of stack in linker options using /STACK option. you can specify the heap size using /HEAP:reserve[,commit]
it safe to use CString class, some times i getting error concerning the stack when using the CString class
What kind of errors There shouldn't be any. If you have errors, than it's likely that somehow you alter the stack (like for example writing arrays beyond their bounds) in some other part of the code.
Simple Samples
Posted: Visual C++ Language, question: what is the stack size in MFC objects?
Re: question: what is the stack size in MFC objects
I am going to mark this thread as answered since you have not followed up with any further information on your problem as requested for over a week - I assume you solved the problem yourself or one of the suggestions in this thread helped you solved the problem. If you have a solution you could post it so others can find it. If you do not have a solution then please submit further details and then mark the thread as unanswered.
Thanks
Damien
--
PS: In hindsight however, the more appropriate place for your question was probably the MFC newsgroup: http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.vc.mfc&lang=en&cr=US