im currently having problem of using null statement on my switch case by using the if and else statement. Pls help me.
switch (o)
{
case '1':
cout << "Please enter the detail of the ownership.";
cout << endl <<"Please enter name your name : ";
cin >> name;
if (name == null){
cout << "Please try again" << endl;
}
Well, you should have your name retrieval code in a loop block, while or do-while, so the data entry repeats when the user enters a "bad" name. http://www.cplusplus.com/doc/tutorial/control/
strings do not equal null in c++.
an empty string in c++ is "" or length = 0.
null can mean something for C strings but it is very complicated, as you can use null == 0 exploit or you could actually have a null pointer depending on what the coder did to you.