Thread: having issue in using operator within multiple classes

  1. #1
    Registered User
    Join Date
    Oct 2017
    Posts
    6

    having issue in using operator within multiple classes

    Hello, I have written a c++ program using operator within multiple classes , but after running the code in code::blocks this error pops up (the screenshot of the error is attached along with the code)

    ns\src\People.cpp |6| error: no matching function for call to 'Birthday::Birthday()'|

    in this program People uses Birthday class information but we have also an operator running in People.cpp
    having issue in using operator within multiple classes-error-jpgexamplecode.txt

  2. #2
    Guest
    Guest
    Post your full code here in [code][/code] tags. That image is very hard to read.

    Looking at the attached code, one immediate mistake I see is that you try to add water (type int) to dateofbirth (type Birthday). That's not gonna "just work".

    In general, you need to use better names for your variables. The basic idea of the program should be clear to someone reading your code. I find it perplexing.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 10-26-2011, 12:30 PM
  2. Classes issue
    By HolyCheeseCubes in forum C++ Programming
    Replies: 5
    Last Post: 03-05-2010, 09:43 AM
  3. Multiple inheritance issue
    By Helix in forum C++ Programming
    Replies: 14
    Last Post: 03-31-2009, 02:21 PM
  4. Issue with abstract classes
    By DavidP in forum C# Programming
    Replies: 1
    Last Post: 08-18-2008, 03:03 PM
  5. overloaded >> operator issue...
    By soulredemption in forum C++ Programming
    Replies: 2
    Last Post: 10-17-2005, 10:53 PM

Tags for this Thread