C++ Grammar Questions

Asked 2 years ago, Updated 2 years ago, 95 views

Hello, I checked the code below while studying open source.

 QString name(void) const { return_name;}
    LinkInterface*  link(void)  { return _link.lock().get(); }

Can we find official documents or articles related to how to declare a function, such as name(void), link(void)?

I wonder if it's to show that there are no parameters explicitly, or if it has a different meaning.

c++ qt qt-designer

2022-09-20 08:46

1 Answers

I can't tell if it's a question about the structure of a function or a question about void, so I'm answering both.

QString name(void) const 
{
    return _name;
}

LinkInterface* link(void)
{
    return _link.lock().get();
}


2022-09-20 08:46

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.