my problem is how to use if else statement with the use of character type string (char str) for exemple
cin>>str; or gets(str) or getline(str,30)
i search this everywhere but every answer could not satisfied me.
on the left you have a pointer, and on the right you have a pointer. The value of a pointer is the number it holds; a single memory address. So the value on the left would be something like 0x0324FEED (a single number, representing an address) and the value on the right would be something like 0x03284EEA (a single number, representing an address). Those numbers (two memory addresses) are what is being compared.
So you are testing to see if both pointers are pointing at the same memory. Of course, they are not pointing at the same memory.
What you are trying to do is compare not the pointers, but what they are pointing at.
You could do this yourself (for example, with something like:
I am working creating a fully encapsulated, homogeneous singly linked data structure. The Listing class and SinglyLinkedList class that are part of the whole application compile fine, but the problem ...