How to function for a null string input in c++? : In java, this can be used,

    Scanner s = new Scanner (System.in);
    String x = s.next();
    if(x == null || x.length() == 0)
         cout << "Please enter someting" ;

as a condition which says "Please enter something" if anyone hits the ENTER key typing nothing.
But how to do it by using codeblocks or visual studio using c++ ?