Chat on IRC |
Array of classes
Posted by shrestha [send private reply] at September 29, 2002, 08:36:07 PM
I need to build an array of classes in C++ in UNIX
I have an array called calculate.... I now need to create an array of the class....something like: calculate array[1000]; I tried this but it says : Segmentation fault when I run it.(it compiles fine though). Is there any way I can do that? Thank you. Shrestha
Posted by Psion [send private reply] at September 29, 2002, 08:56:04 PM
You shouldn't get a segmentation fault with just that line unless your default constructor for calculate produces a segmentration fault when run 1000 times.
Register as a new user | ||||