Q
qazmlp1209
Is the following code reliable? I'm wondering whether it is valid to
invoke the static function using uninitialized pointer.
-----------------
#include <iostream>
class staticCl
{
public:
static void display()
{
}
} ;
int main()
{
staticCl* ptr ;
ptr->display() ;
}
-----------------
invoke the static function using uninitialized pointer.
-----------------
#include <iostream>
class staticCl
{
public:
static void display()
{
}
} ;
int main()
{
staticCl* ptr ;
ptr->display() ;
}
-----------------