小编c_s*_*arp的帖子

C编译器警告未知的转义序列'\.' 使用正则表达式进行c程序

我正在使用正则表达式来确定命令行参数具有.dat扩展名.我正在尝试以下正则表达式:

#define to_find "^.*\.(dat)?"
Run Code Online (Sandbox Code Playgroud)

出于某种原因,我收到了我在这个问题标题中所说的警告.首先,这个表达是否正确?我相信它是.第二,如果它是正确的,我怎么能摆脱这个警告?

我在Xcode编写ac程序,上面的#define在我的.h文件中.谢谢!

c regex

19
推荐指数
1
解决办法
3万
查看次数

SQL语法错误,我没有看到它

我的查询中有错误.这是查询:

select HourTime, count(*) from
(
select substring(time,1,2) as HourTime, count(*) as ActivityCount
from htmp_cs368 a
group by HourTime
)htmp
union
(
select substring(time,1,2) as HourTime, count(*) as ActivityCount
from atmp_cs368 a
group by HourTime
)atmp
group by HourTime DESC
Run Code Online (Sandbox Code Playgroud)

这是错误消息:

ERROR 1064 (42000): 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 'atmp
group by HourTime DESC' at line 12
Run Code Online (Sandbox Code Playgroud)

任何人都可以看到我的错误在哪里?我很感激.这是一个较大程序的一部分,因此是java标记.

mysql sql database

0
推荐指数
1
解决办法
49
查看次数

标签 统计

c ×1

database ×1

mysql ×1

regex ×1

sql ×1