Login Page - Create Account

Support Board


Date/Time: Mon, 24 Feb 2025 01:22:59 +0000



Post From: how to log a vriable?

[2021-02-23 18:20:29]
User61576 - Posts: 445
I am trying to inherit a study by using the example of scsf_TradingSystemStudySubgraphCrossover
and trying to know if I am getting the correct data
so I wanted to log the
SCFloatArray StudyLine1;
I read this ACSIL Interface Members - Functions: sc.AddMessageToLog() and checked the examples of scsf_ButtonAndMenuAndPointerExample
but non the less, when compiling the following code:
SCString MessageText;
MessageText = StudyLine1;
sc.AddMessageToLog(MessageText, 0);

I got errors:
t.cpp: In function 'void scsf_TradingSystemStudySubgraphCrossover(SCStudyInterfaceRef)':
t.cpp:140:16: error: no match for 'operator=' (operand types are 'SCString' and 'SCFloatArray' {aka 'c_ArrayWrapper<float>'})
140 | MessageText = StudyLine1;
| ^~~~~~~~~~
In file included from scstructures.h:105,
from sierrachart.h:22,
from rotation_v5_test.cpp:5:
SCString.h:331:18: note: candidate: 'SCString& SCString::operator=(const SCString&)'
331 | inline SCString& SCString::operator = (const SCString& Rhs)

Any idea what I m doing wrong here?