Thread: Inheritance Phonebook Program

  1. #16
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    StudentIndividual is a class, last name is a string. You can only compare a string to a string. Maybe you should try comparing lastname to StudentIndividual.getLastName() or something similar. If you really must compare Studentindividual to a string you will need to create an overload of the operator== to handle this comparison.



    Jim

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by jimblumberg View Post
    If you really must compare Studentindividual to a string you will need to create an overload of the operator== to handle this comparison.
    That makes no sense, so that would be a bad idea.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program of inheritance
    By student111 in forum C++ Programming
    Replies: 14
    Last Post: 06-06-2012, 01:21 PM
  2. PHONEBOOK in c
    By chie22 in forum C Programming
    Replies: 6
    Last Post: 10-17-2011, 03:26 PM
  3. Need a hand with a Phonebook program
    By spade914 in forum C Programming
    Replies: 2
    Last Post: 10-05-2009, 10:28 PM
  4. phonebook help
    By noob2c in forum C Programming
    Replies: 5
    Last Post: 04-19-2003, 01:51 PM
  5. phonebook
    By jk81 in forum C Programming
    Replies: 6
    Last Post: 09-25-2002, 04:41 AM