#Passing varags to another function
11 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
my code is
void SCI::sendMultiSrc(const uint16_t packetType, const int sourcesCount, ...) {
LOG_INF("SENDING2!");
va_list argsList;
if (bluetooth.connection) {
va_start(argsList, sourcesCount);
LOG_INF("HAVE CONN2!");
bluetooth.sendMultiPacket(bluetooth.connection, packetType, sourcesCount, argsList);
va_end(argsList);
return;
}```
See if https://stackoverflow.com/a/16448191 helps your situation.