Pass by reference C++ Legacy Code Tool
    7 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
I am trying to make a function block with the Legacy Code Tool to call a C++ function. I have a structure for the input and the output and I was wondering if it's possible to pass by reference a structured output using C++.
I try to declare and call it: void function(Input i, Output &o) function(Input i, Output o[1])
I receive the error:
"cannot convert parameter 2 from 'Output *' to 'Output &'"
0 Kommentare
Akzeptierte Antwort
  Kaustubha Govind
    
      
 am 3 Sep. 2013
        I don't think this is currently possible because the Legacy Code Tool generates C S-functions (not C++ S-functions) only, and references are a C++ concept, as far as I know. You may want to introduce another layer to convert the pointer to a reference, or manually modify the S-function generated by Legacy Code Tool.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
			
	Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

