小编Ant*_*tti的帖子

如何下载和安装lint?

有谁知道如何获得Mac,Windows和Linux的lint?sudo port install lint找不到它.

c debugging lint static-code-analysis

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

将String设为仅1行

我有一个输出基本上是一个段落,当我尝试搜索字符串的子字符串时,如果该子字符串被拆分它不起作用.如何将段落字符串变成一行?

示例字符串:

I have an output that is basically a paragraph and when I try 
to search the string for a substring, if that substring is split up it 
doesn't work. How can I make the paragraph string into just 1 line?
Run Code Online (Sandbox Code Playgroud)

子串:"它不起作用"

当我尝试搜索该子字符串时,它不会返回true.

delphi string

5
推荐指数
1
解决办法
8061
查看次数

从c中的"/ dev/random"中读取

我正在从/ dev/random读取uint16_t类型的高质量16位随机数,我得到的数字大到:2936814755.这些是否正确

int myFile = open("/dev/random", O_RDONLY);            
unsigned int rand;            
uint16_t randomNum = read(myFile, &rand, sizeof(rand)) ;
printf(" %u ", rand);
close(myFile);
Run Code Online (Sandbox Code Playgroud)

c random

2
推荐指数
1
解决办法
4929
查看次数

标签 统计

c ×2

debugging ×1

delphi ×1

lint ×1

random ×1

static-code-analysis ×1

string ×1