如何将变量添加到字符串中?我想传输具有实际值的字符串depth。那么如何将其添加到消息中呢?
depth
float depth = ((pressure) / (g)) * 100; char message[] = "$DBS,,f,depth,M,,,F*hh<CR><LF>"; //Put actual depth here
c string
c ×1
string ×1