Change =
to ==
in your if statement.
More Related Contents:
- How to convert a char array to a string?
- how to change to c code while using for loop and array
- Getting a segmentation error when printing my array of strings
- isnt everything where it should be, why the segmentation fault?
- Assigning char array from ifstream breaks array if adding another char to array
- How to convert a std::string to const char* or char*
- Is a string literal in С++ created in static memory?
- Why is conversion from string constant to ‘char*’ valid in C but invalid in C++
- std::string to char*
- .NET / C# – Convert char[] to string
- Why does streaming a char pointer to cout not print an address?
- Conversion from string literal to char* is deprecated
- Deprecated conversion from string literal to ‘char*’
- splitting a string into an array in C++ without using vector
- Return char[]/string from a function [duplicate]
- cannot convert ‘std::basic_string’ to ‘const char*’ for argument ‘1’ to ‘int system(const char*)’
- can’t modify char* – Memory access violation
- What am I not understanding about getline+strings?
- Braces around string literal in char array declaration valid? (e.g. char s[] = {“Hello World”})
- C / C++ How to copy a multidimensional char array without nested loops?
- Parse string containing numbers into integer array
- C split a char array into different variables
- What is the simplest way to convert char[] to/from tchar[] in C/C++(ms)?
- Concatenate char arrays in C++
- strcmp or string::compare?
- Reverse String C++ using char array
- How can a char pointer be initialized with a string (Array of characters) but an int pointer not with an array of integer? [duplicate]
- Where are string literals stored, and can I modify them?
- Assign a string literal to a char* [duplicate]
- Assigning char array a value in C