my problem is how to use if else statement with the use of character type string (char str[40]) for exemple
char str[30];
cin>>str; or gets(str) or getline(str,30)
if(str=="hello") cout<<"world";
i search this everywhere but every answer could not satisfied me.
moaz.amin.37 -12 Junior Poster
Suzie999 245 Coding Hobbyist
Moschops 683 Practically a Master Poster Featured Poster
moaz.amin.37 -12 Junior Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.