avatar
请问C语言fscanf的用法# Computation - 科学计算
L*A
1
前几天从朋友家拿回来的曼驼罗还种在花盆里,没移出来。放在前院草坪和房子之间的
地上,想棕吕树可以给它遮遮阴。今天早上起来就发现被什么动物给啃了1个最大的叶
子,连唯一的1个大花孤独也被啃了1半!绝对不是虫子,因为从残留的叶子可看出是
那种撕碎的痕迹,不是均匀的茬口。不是有毒吗?怎么旁边的所有花都没吃,只吃了这
个?还有啥动物会偏好这1口?!
avatar
u*s
2
Why can't you tell secretes in a corn field?
Because there are too many EARS!
这个是超市卖玉米棒子的框边上的广告上写的。
avatar
d*y
3
因为对时间要的求不是很精确,我是打算用sleep和signal来做定时运行.
对这个test case的话,只想让tshark运行30秒,然后tshark被kill pid,然后等10分
钟,tshark程序再运行
但是我是在程序里用SYSTEM来向console发命令的,所对好像是在定时器这些方面有问
题,想让tshark 运行30秒,做不出来效果。
我在main()里是这么写的
struct sigaction act;
union sigval tsval;

act.sa_handler = show_msg;
act.sa_flags = 0;
sigemptyset(&act.sa_mask);
sigaction(50, &act, NULL);
len = strlen(msg);

while ( 1 )
{
system("tshark > logtext.txt &echo $! > tsharkpid"; // 发tshark命令,
写 tshark pid到文件里
/*
我不知道
avatar
d*2
4
FILE *pFile;
pFile=fopen("myfile.txt","r");
fscanf(pFile,"%e, %e, %e, %e",&variable1,&variable2,&variable3,&variable4)
fclose(pFile);
myfile.txt
4.232e-002, 4.232e-002, 4.232e-002, 4.232e-002
为什么不对呢?
先谢了!
avatar
y*2
5
snails?
avatar
f*e
6
在英语里玉米的个数用的是 "ear of corn". For example:
"你要几个玉米?"
"6个."
"How many ears of corn do you want?"
"6 ears please"
That's why the joke is funny. hehe

【在 u**********s 的大作中提到】
: Why can't you tell secretes in a corn field?
: Because there are too many EARS!
: 这个是超市卖玉米棒子的框边上的广告上写的。

avatar
r*t
7
为什么不用 crontab 来搞? 不用写成程序。
avatar
l*d
8
What's the error msg?

【在 d*******2 的大作中提到】
: FILE *pFile;
: pFile=fopen("myfile.txt","r");
: fscanf(pFile,"%e, %e, %e, %e",&variable1,&variable2,&variable3,&variable4)
: fclose(pFile);
: myfile.txt
: 4.232e-002, 4.232e-002, 4.232e-002, 4.232e-002
: 为什么不对呢?
: 先谢了!

avatar
g*e
9
这口味太重了吧。
avatar
P*e
10
so easy
you can google it
here are some references
ear:
any part that resembles or suggests an ear in position or form, as the
handle of a teacup.
corn:
3. the ears of this plant.

【在 u**********s 的大作中提到】
: Why can't you tell secretes in a corn field?
: Because there are too many EARS!
: 这个是超市卖玉米棒子的框边上的广告上写的。

avatar
d*2
11
没有error message. 用
cout << "variable1: " << variable1 << endl;
cout << "variable2: " << variable2 << endl;
看,
variable1: 1
variable2: 7.7433e+268
variable1,variable2是double型. (double variable1,variable2;)

【在 l*****d 的大作中提到】
: What's the error msg?
avatar
l*d
12
找找有没有昏迷者?
avatar
P*e
13
也就是玉米和玉米的果实是有区别的。
玉米的果实 ear 最准确吧
尽管corn也可以表示玉米的果实。

【在 P**********e 的大作中提到】
: so easy
: you can google it
: here are some references
: ear:
: any part that resembles or suggests an ear in position or form, as the
: handle of a teacup.
: corn:
: 3. the ears of this plant.

avatar
l*d
14
Google fopen C++, and see the parameter list of fopen function.

【在 d*******2 的大作中提到】
: 没有error message. 用
: cout << "variable1: " << variable1 << endl;
: cout << "variable2: " << variable2 << endl;
: 看,
: variable1: 1
: variable2: 7.7433e+268
: variable1,variable2是double型. (double variable1,variable2;)

avatar
L*A
15

说了绝对不是虫类,是撕碎伤,还有小碎叶片悬挂在叶子上。

【在 y****2 的大作中提到】
: snails?
avatar
u*s
16
got it, thx!
avatar
p*M
18
裴帅哥家真是百草园,百花廷呀。一年四季都有鸟语花香,神仙境界。

【在 L****A 的大作中提到】
: 前几天从朋友家拿回来的曼驼罗还种在花盆里,没移出来。放在前院草坪和房子之间的
: 地上,想棕吕树可以给它遮遮阴。今天早上起来就发现被什么动物给啃了1个最大的叶
: 子,连唯一的1个大花孤独也被啃了1半!绝对不是虫子,因为从残留的叶子可看出是
: 那种撕碎的痕迹,不是均匀的茬口。不是有毒吗?怎么旁边的所有花都没吃,只吃了这
: 个?还有啥动物会偏好这1口?!

avatar
L*A
20

我又看了下原文,哪里看出来百草院呀?不能够啊!我家跟版上的MM们家比根本就拿不
出手!

【在 p***M 的大作中提到】
: 裴帅哥家真是百草园,百花廷呀。一年四季都有鸟语花香,神仙境界。
avatar
d*y
21
maybe you can try to use "%lf" instead of "%e"

【在 d*******2 的大作中提到】
: FILE *pFile;
: pFile=fopen("myfile.txt","r");
: fscanf(pFile,"%e, %e, %e, %e",&variable1,&variable2,&variable3,&variable4)
: fclose(pFile);
: myfile.txt
: 4.232e-002, 4.232e-002, 4.232e-002, 4.232e-002
: 为什么不对呢?
: 先谢了!

avatar
p*M
22
嫩家是小巧精致。院不在大,有爱花惜花之人则灵

【在 L****A 的大作中提到】
:
: 我又看了下原文,哪里看出来百草院呀?不能够啊!我家跟版上的MM们家比根本就拿不
: 出手!

avatar
d*2
23
正确答案! 多谢!

【在 d***y 的大作中提到】
: maybe you can try to use "%lf" instead of "%e"
avatar
T*4
24
曼陀罗也要种啊?多野的花啊
avatar
y*2
25
cat?
avatar
L*A
26
这个是我第1怀疑对象!常有几只猫到我家前院溜弯。
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。