"missing default parameter" in constructor???

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manontheedge
    New Member
    • Oct 2006
    • 175

    "missing default parameter" in constructor???

    I'm trying to pass a pointer of a class into another class' constructor. I keep getting the error "missing default parameter", here's a hopefully simplified example of what I'm trying to do...



    this is in class A, where both classes are first created...

    Code:
    m_pClassB = new ClassB();
    m_pClassC = new classC( m_pClassB );


    here's how I'm trying to pass it...

    Code:
    constructorClassC( classB *pClassB );

    if anyone can help me out I'd appreciate it ... I've been stuck on this for a little bit
  • manontheedge
    New Member
    • Oct 2006
    • 175

    #2
    I think I just got it ... there were other variables with default parameters listed BEFORE the class pointer being passed in ... I didn't realise I had to have the values with default values AFTER

    Comment

    • Banfa
      Recognized Expert Expert
      • Feb 2006
      • 9067

      #3
      That is correct

      Comment

      Working...