Use the following code:
if(strcmp(name,empName)==0)
{
...
}
Note that there must be no quotation marks around empName
to compare its contents.
More Related Contents:
- sizeof works unusual at c++ after array creation [duplicate]
- Unterminating c++ Program [closed]
- Where do I find the current C or C++ standard documents?
- How can I pass a member function where a free function is expected?
- Calculating pow(a,b) mod n
- C++11 make_pair with specified template parameters doesn’t compile
- How to use a C++ string in a structure when malloc()-ing the same structure?
- C++ Erase vector element by value rather than by position? [duplicate]
- C++ “cin” only reads the first word [duplicate]
- Use ‘class’ or ‘typename’ for template parameters? [duplicate]
- Which C++ Standard Library wrapper functions do you use?
- How to solve “Unresolved inclusion: ” in a C++ file in Eclipse CDT?
- What’s this C++ syntax that puts a brace-surrounded block where an expression is expected?
- Difference between [square brackets] and *asterisk
- Why is modifying a string through a retrieved pointer to its data not allowed?
- Generate SHA hash in C++ using OpenSSL library
- use std::fill to populate vector with increasing numbers
- What is the default hash function used in C++ std::unordered_map?
- Translating python dictionary to C++
- how to check string start in C++
- Can Google Mock a method with a smart pointer return type?
- std::mutex performance compared to win32 CRITICAL_SECTION
- cannot convert parameter 1 from ‘char’ to ‘LPCWSTR’
- Linking C++ code with ‘gcc’ (without g++)
- How to get hWnd of window opened by ShellExecuteEx.. hProcess?
- What standard clause mandates this lvalue-to-rvalue conversion?
- is winsock2 thread safe?
- How is this a most vexing parse?
- How can I initialize C++ class data members in the constructor?
- What does the vertical bar ( | ) mean in C++?