這是我的代碼:如何在Java和Arduino IDE中的字符串中保存/ *?
GPRS.write("Accept: */*");
但Arudino IDE採取/*
作爲註釋的開始並給出了此錯誤:
java.lang.RuntimeException: Missing the */ from the end of a /* comment */
我試圖/*
之前把\
但沒有工作。如何擺脫這個?
這是我的代碼:如何在Java和Arduino IDE中的字符串中保存/ *?
GPRS.write("Accept: */*");
但Arudino IDE採取/*
作爲註釋的開始並給出了此錯誤:
java.lang.RuntimeException: Missing the */ from the end of a /* comment */
我試圖/*
之前把\
但沒有工作。如何擺脫這個?
如果是這樣的Java代碼,你可以這樣寫一個解決辦法:
GPRS.write("Accept: */" + "*");
如果你的IDE無法識別該/*
是一個字符串,我會說這是一個非常大的錯誤IDE。
是的,你是對的[是一個錯誤](http://code.google.com/p/arduino/issues/detail?can=2&q=817&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&id=817 ),它是在1年多前提交給arduino的bug追蹤器。似乎不是他們的最高優先級:) – halex 2013-04-22 12:38:56
把''放在'/'和'*'之間。 – 2013-04-22 12:26:33
這是[已知錯誤](http://code.google.com/p/arduino/issues/detail?can=2&q=817&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&id=817) – halex 2013-04-22 12:36:35