The constructor ClientDemo(String, int) is undefined
时间: 2024-03-24 18:41:43 浏览: 114
gcc 函数属性 attribute ((constructor))使用demo
This error message is usually displayed when you try to create an object of a class that doesn't have a constructor with the specified parameters.
To fix this error, you need to add a constructor to the "ClientDemo" class that takes a String and an int as parameters. For example:
```
public class ClientDemo {
public ClientDemo(String str, int num) {
// Constructor code here
}
// Other methods and variables can go here
}
```
Once you've added this constructor, you should be able to create an object of the "ClientDemo" class with a String and an int parameter without any errors.
阅读全文