Thread: Help | classes and stuff

  1. #1
    Registered User danielcplusplus's Avatar
    Join Date
    Aug 2014
    Location
    earth
    Posts
    14

    Help | classes and stuff

    Can anyone please explain to me why i am getting an error with Interface but not with Test ?
    Picture here >> Gyazo - 2c25c4a33c7c356223f6b146af8c1194.png

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    You forgot to declare and define Test::Interface with a return type.

    By the way, you can post code while retaining the formatting and get syntax highlighting by posting within [code][/code] bbcode tags.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User danielcplusplus's Avatar
    Join Date
    Aug 2014
    Location
    earth
    Posts
    14
    feeling so dumb after that mistake
    and yeah, just too lazy :P
    Thanks

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    You're also asking readers to click an extra link. I was too lazy to do that.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Conversions between base classes and derived classes
    By tharnier in forum C++ Programming
    Replies: 14
    Last Post: 03-18-2011, 10:50 AM
  2. Classes access other classes local variables
    By parad0x13 in forum C++ Programming
    Replies: 6
    Last Post: 01-14-2010, 04:36 AM
  3. References vs Pointer vs copying and storing stuff in classes
    By Monkeymagic in forum C++ Programming
    Replies: 20
    Last Post: 09-01-2006, 09:40 AM
  4. Classes with Other Classes as Member Data
    By njd in forum C++ Programming
    Replies: 2
    Last Post: 09-27-2005, 09:30 AM
  5. Help accessing classes and derived classes
    By hobbes67 in forum C++ Programming
    Replies: 8
    Last Post: 07-14-2005, 02:46 PM