fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. typedef struct {
  5. // const
  6. double LN20;
  7. double LN40;
  8.  
  9. // methods
  10. double NoteToFrequency(int noteNumber);
  11. } Tool;
  12.  
  13. extern const Tool tool;
  14.  
  15. const Tool tool {1.34, 3.14};
  16.  
  17. int main() {
  18. cout << tool.LN20 << ' ' << tool.LN40 << '\n';
  19. return 0;
  20. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
1.34 3.14