Cássio da Rosa / Publications
Forum
Return Struct When Struct has Constructor
The goal is to, have a function getTradeRecord that returns a struct trade_record . That struct should be initialized by its constructor. The problem is, when the struct trade_record is initialized by its constructor, we get a compilation error in the return statement. Code bellow