I have a relatively simple C++ code. It compiles, but after starting it displays the message "Process terminated with status -1073741510 (0 minute (s), 13 second (s))". Is the code normal or is there some logical error? If it's normal, what should be displayed and why?
#include <iоstrеаm>
#include <string>
struct А {
А(std::string) {}
};
struct В : public А {
В() : А ( s = f() ) {}
void print() { std::cout << s << std::еndl; }
std::string f() { return "Hello"; }
private:
std::string s;
};
int main() {
В b;
b.print();
rеturn 0;
}