RSS Forums RSS
Please support our C++ advertiser: Programming Forums

how to compare a string to null...

Join Date: Jul 2006
Location: Oblivion
Posts: 647
Reputation: jaepi is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
jaepi's Avatar
jaepi jaepi is offline Offline
Practically a Master Poster

how to compare a string to null...

  #1  
May 10th, 2007
hello there, im new in c++...i just want to know how to compare a string to null like:

string x;
cin >> x;

if(x==NULL){

cout << "null";

}

im using this one, if(&x==0) ...but it does'nt work...
this is what my mentor told me to do...

help..thanks
Retreat!!!
AddThis Social Bookmark Button
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:19 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC