class within function of another class

I keep getting a message saying error: no matching function for call to ‘rotor::rotor()’
machine::machine(ifstream &infile)

Wondering what I'm doing wrong. If anyone could help me out that'd be great!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
   machine::machine(ifstream &infile)
  {
    int mult;
    int add;
  
    vector<int>spindle;
  
    while(!infile.eof())
    {
      infile>>mult;
      infile>>add;
      spindle.push_back(mult,add);
      r[i+1](mult,add);
    }
  }

rotor::rotor(int m, int a)
     :mult(m), add(a)
   {
  }
Sounds you don't have default constructors for your classes.
Topic archived. No new replies allowed.