首页 \ 问答 \ 调试模式下的Sqlite编译器错误“初始化程序不是常量”(Sqlite compiler errors in Debug mode “initializer is not a constant”)

调试模式下的Sqlite编译器错误“初始化程序不是常量”(Sqlite compiler errors in Debug mode “initializer is not a constant”)

我正在尝试将sqlite添加到我的项目中,但我得到了几个“初始化程序不是常量”错误。 出于某种原因,这只发生在调试模式下,而不是发布模式。

它崩溃的一行是来自sqlite3.c的exmaple行97668:

static const int iLn = __LINE__+2;

关于为什么会发生这种情况的任何想法/如何解决这个问题?


I'm trying to add sqlite to my project, but I'm getting several "initializer is not a constant" errors. For some reason this only happen in Debug mode, and not in Release mode.

A line its crashing on is for exmaple line 97668 from sqlite3.c:

static const int iLn = __LINE__+2;

Any ideas on why this is happening / how I could fix this?


原文:https://stackoverflow.com/questions/22358873
更新时间:2024-05-03 12:05

最满意答案

只有一个输入名称的html

 <form action="checkbox.php">
<input type="checkbox" name="data[]" value="1">1<br>
<input type="checkbox" name="data[]" value="2">2<br>
<input type="checkbox" name="data[]" value="3">3<br>
<input type="checkbox" name="data[]" value="4">4<br>
<input type="checkbox" name="data[]" value="5">5<br>
<input type="submit">
</form>

checkbox.php

$data = $_GET["data"]; //$data is an array with checked option

它也适用于类型文本

<input type="text" name="text_data[1]"><br>
<input type="text" name="text_data[2]"><br>
<input type="text" name="text_data[3]"><br>

html with only one name for input

 <form action="checkbox.php">
<input type="checkbox" name="data[]" value="1">1<br>
<input type="checkbox" name="data[]" value="2">2<br>
<input type="checkbox" name="data[]" value="3">3<br>
<input type="checkbox" name="data[]" value="4">4<br>
<input type="checkbox" name="data[]" value="5">5<br>
<input type="submit">
</form>

checkbox.php

$data = $_GET["data"]; //$data is an array with checked option

it works also for type text

<input type="text" name="text_data[1]"><br>
<input type="text" name="text_data[2]"><br>
<input type="text" name="text_data[3]"><br>

相关问答

更多
  • 可以通过以下代码实现目标: function getProfile() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onr ...
  • 老实说抱歉,我刚刚意识到在混合php和html时,我忘了在html标签中添加name属性。 I'm honestly sorry, I've just realized that in mixing that php and html, I've forgot to add name attribute in html tags.
  • 您只有选项ID才能将{{ fruit.number }}附加到您的选择名称: {% for fruit in response %} {{ fruit.number }}
  • 只有一个输入名称的html
    1
    2
    3
    4
    ...
  • 我为你做了一个小提琴,并将ready函数与click函数结合在一个自己的处理程序中。 您不仅可以检查on click值on click因为如果文档被加载则没有单击,因此没有任何反应。 https://jsfiddle.net/ww582Lj9/ function myHandler(e) { if($(this).attr("value")=="1"){ $("#sudandetails").css("display","block"); $("#countr ...
  • 您会注意到,如果单击并按住鼠标,则可以不间断地键入字段。 只有当您松开鼠标按钮时,焦点才会被盗,而您无法再键入。 通过这种行为观察,我访问了Chrome以查看正在处理的事件: 我发现该document有一个mouseup事件的处理程序,而且这段代码来自icx-ez-excerpt.js 。 通过您的文档追溯这一点,您可以在下面找到相关的参考资料(删除这些,当然,解决了问题):