S
S
sddvxd2018-04-02 22:31:10
C++ / C#
sddvxd, 2018-04-02 22:31:10

Why doesn't the compiler find the prototype?

Hello

//header.h
class Shop:public Queue{
private:
  int rating;
public:
  Shop(int rating = 0,const Queue &q);
};

//func.cpp
Shop::Shop(int rating,const Queue &q):Queue(q){}

Compiler output: default argument omitted for parameter 2

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sddvxd, 2018-04-02
@sddvxd

Got it: optional parameters should be on the right

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question