Why do I get a segmentation fault in my simple c++ program using libexpect.so?
I am busy with a project where I have to automate some processes in bash or ssh so I decided to use the libexpect.so library. If you don't know what libexpect is, it provides an expect extension that I can use in a c++ program, and expect is just a program where you can run automated scripts for things like ssh. So I can execute a script which attempts to ssh somewhere...when the password prompt is found by expect I could have already given expect a password to send. My problem is that when I run a program, even a really simple one, I get a segmentation fault which I narrowed down, with gdb,