5am question: What did i do wrong.

This is a discussion on 5am question: What did i do wrong. within the C++ Programming forums, part of the General Programming Boards category; Code: ... public: Alarm::Alarm(int inYear, int inMonth, int inDay, int inHour, int inMinute, int inSecond, void(*) inPtr); ~Alarm(); ... Whats ...

  1. #1
    That Creepy Network Guy DeepBlackMagic's Avatar
    Join Date
    Feb 2003
    Posts
    265

    5am question: What did i do wrong.

    Code:
    ...
    	public:
    		Alarm::Alarm(int inYear, int inMonth, int inDay, int inHour, int inMinute, int inSecond, void(*) inPtr);
    		~Alarm();
    ...
    Whats wrong with the constructor. Its mad at my function pointer. Excuse the idiocy but its 5am and im going to bed now.

  2. #2
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    If inPtr is supposed to be a function pointer, shouldn't it look something like:

    void (*inPtr)(void);

    Maybe the (void) part needed to be added, or at least ().

  3. #3
    That Creepy Network Guy DeepBlackMagic's Avatar
    Join Date
    Feb 2003
    Posts
    265

    Thanks.

    Ya that fixed it. I guess i shouldnt be trying to code right now. Not like that ever stopped me before. =P Good luck on whatever your coding at now 5:30 =P

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Design layer question
    By mdoland in forum C# Programming
    Replies: 0
    Last Post: 10-19-2007, 05:22 AM
  2. Newbish Question file reading question....
    By kas2002 in forum C Programming
    Replies: 23
    Last Post: 05-17-2007, 01:06 PM
  3. General forum question - if in wrong forum...
    By ulillillia in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 05-14-2007, 06:00 AM
  4. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM
  5. Math Question, hard
    By Yoshi in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 12-08-2001, 11:58 AM

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