Please help on how to compare both of these strings.. (R1 for example has first name, R2=Middle, R3=Last) But both strings are different if you notice the R_
What should i put under my string class and main.cpp
So, your compiler tells you that there is no compare function for WCS_String... because there is no compare function for WCS_String. There is, however, a Compare function. There is also an operator==. Who knew you could find this stuff by looking in a header file?
cire, but the problem is when i put this code for comparison or the if statement then it says that Name.h doesnt have compare... how can we make it look from the WCS_STRING?
yes.. cire, you got it.. thats my problem.. trying to do it ...but not working.... for some reason.. dont know what i am doing wrong.. i tried string:compare thread....still no hope
Well, again, you aren't showing the relevant "parts." How have you tried to implement it? Why would you use std::string methods when no std::string is involved?
what i have to do is : Create a Name class composed of three String objects (for First, Middle, and Last). Provide methods and operators for comparing Names, reading and writing Names, and for allowing the retrieval and changing of the components of a Name (i.e. Get and Set methods for First, Middle and Last).
Suppose you have a phone book, and you're looking for a name.
Suppose you're looking for the name Boaz, George C, but you open the phone book and the first name you see is Phillips, Michael A.
When you look at that name, what is the relevant portion for deciding whether the name you're looking for is ahead of or after the name you opened it to? Is it the first name or the middle initial you start with?