Is it valid to have a html form inside another html form?

A. It is not valid HTML nor XHTML In the official W3C XHTML specification, Section B. “Element Prohibitions”, states that: “form must not contain other form elements.” http://www.w3.org/TR/xhtml1/#prohibitions As for the older HTML 3.2 spec, the section on the FORMS element states that: “Every form must be enclosed within a FORM element. There can be … Read more

When does invoking a member function on a null instance result in undefined behavior?

Both (a) and (b) result in undefined behavior. It’s always undefined behavior to call a member function through a null pointer. If the function is static, it’s technically undefined as well, but there’s some dispute. The first thing to understand is why it’s undefined behavior to dereference a null pointer. In C++03, there’s actually a … Read more