Click here to Skip to main content
12,395,645 members (60,921 online)
Click here to Skip to main content

Tagged as

Stats

0 views
Posted

equality operator in string in c++

, 3 Feb 2013 CPOL
Simple way to compare two strings:#include #include using namespace std;int main(){ char *p = "ram"; char *q = new char[4]; int b=0,i=0; if(strcmp(p,q)) i++; else b++; cout<<i<<"\n"<<b<<"\n"; return 0;}

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available No 3-Feb-13 8:31 Available Nemanja Petrovic
Updates in content. 146 changes had been made.
1 No 3-Feb-13 8:21 Available Nemanja Petrovic

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Nemanja Petrovic
Student
Serbia Serbia
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160721.1 | Last Updated 3 Feb 2013
Article Copyright 2013 by Nemanja Petrovic
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid