Click to See Complete Forum and Search --> : while loops in distructor of the class


prashanthakumar
November 12th, 2007, 03:28 AM
Hi,

i am working in borland c++ in windows. it is giving error while build, that "functions containing while are not expanded inline". Please give solution for this.

0xC0000005
November 12th, 2007, 06:49 AM
I don't use the Borland compiler so I am just guessing, but it sounds like you are defining the destructor inside the class definition (in the header file) and since it contains a while loop the compiler does not want to expand it inline. Try declaring the prototype only in the header file and place the body in the C++ file.