Hi all,
I have this piece of code that causes segmentation fault:
The result I am getting is:Code:.... check argv[2] exists .... std::string* op_file; ... std::cout << "argv[2] is: " << argv[2] << std::endl; op_file = new std::string(argv[2]); ...
Thanks a lot.Code:argv[2] is: somefile.txt Segmentation fault (core dumped)