簡體   English   中英

有沒有辦法在CAPL中將整數轉換為char?

[英]Is there a way to convert integer to char in CAPL?

我嘗試使用CAPL中的filePutString()函數將整數變量寫入文件。 有沒有一種方法可以將整數轉換為char,因為filePutString()僅使用char作為參數。

我想最好的方法是使用snprintf。

char buffer[100];
int number = 10;
snprintf(buffer, elcount(buffer), "Text: %d", number);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM