Hello, I'm facing a rather strange problem that I need help on solving... So when I instantiate a derived class (HomePC, GamingPC or WorkstationPC) from the base abstract class (PC), I get segmentation fault message. What's even more strange is that, on the IDE (Code::Blocks) the program runs fine the first 2 times I try to instantiate, but the 3rd time, instead of crashing, the while loop terminates. The crash occures on Putty though, but not on the IDE?
I uploaded the code on pastebin because it's too big to fit here.
Instatiation that causes the crash happen on lines 306, 311 and 316.