Inheritance Phonebook Program

This is a discussion on Inheritance Phonebook Program within the C++ Programming forums, part of the General Programming Boards category; StudentIndividual is a class, last name is a string. You can only compare a string to a string. Maybe you ...

  1. #16
    Registered User
    Join Date
    May 2010
    Posts
    2,560
    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をこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,170
    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.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

Page 2 of 2 FirstFirst 12
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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21