I\'m a c++ newbie (just oldschool c). My son asked for help with this and I\'m unable to explain it. If he had asked me \"how do I compare strings\" I would have told hi
You are comparing memory addresses. The example that follow explains how to compare 2 strings:
#include "stdafx.h"
#include
#include //prototype for strcmp()
int _tmain(int argc, _TCHAR* argv[])
{
using namespace std;
cout << strcmp("A", "Z"); // will print -1
cout << strcmp("Z", "A"); // will print 1
return 0;
}