Hi,
I am writing a program linked-list storing structs, program implements interface. when I call the insert function from main I get the message:
Segmentation Fault (core dumped)
Any ideas what this message means.
Thanks
Hi,
I am writing a program linked-list storing structs, program implements interface. when I call the insert function from main I get the message:
Segmentation Fault (core dumped)
Any ideas what this message means.
Thanks
How about showing us the code so we can see what you are doing wrong?
Can't say for sure, but you may have made the common mistake of forgetting to set the "next" pointer to null, ie:
class foo{
foo * next;
foo():next(NULL){} //...very important...
};
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }