part of my code
problem:Code:#include <iostream> #include <algorithm> #include <string> #include <fstream> using namespace std; int main () { int x; int y; char a[]={}; char b[]={}; ifstream word("test1.txt"); word>>a; sort(a,a+strlen(a)); ifstream wordlist("text2.txt"); wordlist>>b; sort(b,b+strlen(b)); cout<< a<<"="<<b; if (a==b) {cout<<"hello";} //print if equal cin.get(); }
if block is always false.
i need char value for sort command.