zoukankan      html  css  js  c++  java
  • 奇异的现象

          今天在写一个程序时发现一个奇异的现象。
          注意其中的float ssavg_ap[4];  float ssdev_ap[4];   当我把它两放在main函数外面作全局变量时,程序编译没问题,但执行时就出现如下错误:
    Inset error 1064:
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version 
    for the right syntax to use near ' ( p-) pM) u-) p-) ' at line 1
    起初我以为是我float变量的精度问题,或是SQL语句错误,或是计算错误。后来我把上述两句声明放到main函数里面,奇迹般的就插入成功了,
    实在想不通这是为什么,这点小问题实在是难以发现。

    Code

  • 相关阅读:
    Spring boot mybatis : Error creating bean with name 'com.github.pagehelper.autoconfigure.MapperAutoConfiguration': Invocation of init method failed;
    方法调用
    初识MQ
    Shell 变量
    Eclipse 导入本地 Git 项目
    IDEA 常用快捷键
    Xshell 配色方案
    冒泡排序
    递归
    安卓服务Service详解
  • 原文地址:https://www.cnblogs.com/ftyblog/p/1569671.html
Copyright © 2011-2022 走看看