Ask Your Question
0

How can the function return type be fully specified with a namespace?

asked 2022-09-11 11:00:00 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-04-26 17:00:00 +0000

lakamha gravatar image

To fully specify the return type of a function with a namespace, the namespace should be included in the return type declaration. For example, if the function returns an integer and is part of a namespace called "mynamespace", the return type declaration would be:

mynamespace::integer

This would indicate that the function returns an integer from the "mynamespace" namespace. If the namespace contains sub-namespaces, they can also be included in the return type declaration.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-09-11 11:00:00 +0000

Seen: 15 times

Last updated: Apr 26 '21