Why are you using arrays of int?
Also I do believe that the name of an array is just a pointer to the first "block" of the array, so if I'm correct your doing nothing, but comparing the address of the arrays.
I tried also adding a bool variable that will be set to false if it isnt the same word and i set it using a for loop that checks the entire array one by one. Still didnt work.
|
That sounds like the right direction to take with this sort of thing.
This is an example of what I did to compare. I know arrays dont work like that with the "==" but i was to understand that when its a string, it does work.
|
You can use C++ strings like that yes, and I would recommend the string type for this yes.
There are two types of strings: C style strings, which use arrays to hold their chars and C++ strings which is actually a class, but might as well be a basic type(like an int, or char). The reason your porbley better off using a C++ string( declared like this:
string mystring= "hi"
) because of the equality operator being overloaded and... on second thought I guess thats the only reason...
EDIT: 100th
EDIT: sorry if I'm wrong about anything, and don't quote me on any of this...