JavaBoy

Hi everyone,
I am trying to implement a merge sort with linked list implementetaion. as you know, to implement the algorithm of merge sort, we should use three nested function,
mergeSort(),
mergeSort(),
merge().
So, because of this plenty of calling functions , the overflow stack exception is thrown.
How can I fix it

Thanks



Re: Visual C++ Express Edition the overflow stack exception

Gh0st in the shell

mergeSort(),
mergeSort(),

Overload of functions

Try indexes or links...

Exp: void* callprocedure();





Re: Visual C++ Express Edition the overflow stack exception

JavaBoy

I did the follolwing explicitly.
head = mergeSort(head);
tail= mergeSort(tail);
head = merge(head, tail);





Re: Visual C++ Express Edition the overflow stack exception

Gh0st in the shell

maybe need to make function with only transfer value of a variable, not a object

mergeSort(Variable&)

{

...some operations...

return new_variable

}

maybe you have a classic error like this

void print(double);
void print(long);

void f()
{
print(1L); // print(long)
print(1.0); // print(double)
print(1); // ERROR! print(long(1)) print(double(1))
}

hm...

please write all source or source code of "mergeSort();" function.





Re: Visual C++ Express Edition the overflow stack exception

JavaBoy

Thanks for your interest.
I can not copy my codes in here since it is an assignment so that someone from my university can cathc them and use it which make me in trouble.
would you give you e - mail address to me so , we can solve the problem together.

Again thanks for your interests.

Best wishes





Re: Visual C++ Express Edition the overflow stack exception

Gh0st in the shell

my e-mail: ghostoffice@mail.ru

my ICQ: 489-188-928





Re: Visual C++ Express Edition the overflow stack exception

JavaBoy

If it is possiible for you, would you please neter the IcQ now to discuusss the problem

Thanks
Best wishes