Click here to Skip to main content
13,090,730 members (44,354 online)
Click here to Skip to main content

Tagged as

Stats

0 views
Posted 3 Feb 2013

equality operator in string in c++

, 3 Feb 2013
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 2:31 Available Nemanja Petrovic
Updates in content. 146 changes had been made.
1 No 3-Feb-13 2: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
This member doesn't quite have enough reputation to be able to display their biography and homepage.

You may also be interested in...

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