This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / In C language, how to print string from right end using printf? Thanks
-iris_li(iris);
2004-9-11
(#1881577@0)
-
right end是什么意思啊?
-dts(独头蒜);
2004-9-11
(#1881607@0)
-
printf("%100s", str);
-canadiantire(八卦轮胎);
2004-9-11
(#1881613@0)
-
请问如果写%80是不是就打字串的%80个字符,也就是说如果字串有三个字母就打2.4个?
-dts(独头蒜);
2004-9-11
(#1881618@0)
-
In English, "%80" makes no sense. the correct way is to say "80%" that reads "eighty percent". in C, %80 mean eighty spaces, and string are right align by default.I know you are teasing me. ;)
-canadiantire(八卦轮胎);
2004-9-11
{29}
(#1881637@0)
-
那如果字串长120,是前20不打还是后20不打?
-dts(独头蒜);
2004-9-11
(#1881655@0)
-
全输出。
-canadiantire(八卦轮胎);
2004-9-11
(#1881659@0)
-
你与其花这个功夫打字问问题,不如翻翻书或自己敲几行CODE什么都有了.
-johnnyzh(bubble);
2004-9-11
(#1881662@0)
-
Becasue I have a report with 3 columns in Arial, The third column can not be align using printf(%80s...), How can I do?
-iris_li(iris);
2004-9-12
(#1882285@0)
-
如果你是GUI programming 那就是另一回事了。Arial是非等宽字体,你需要调Windows API来计算总的宽度和输出的位置。可以帮你查,但自己去MSDN查一查吧,收获更大些。
-canadiantire(八卦轮胎);
2004-9-12
(#1882309@0)
-
It is not GUI programming. It is just C running on mainframe
-iris_li(iris);
2004-9-12
(#1882331@0)
-
你说的具体一点么?我被你的问题搞糊涂了。
-canadiantire(八卦轮胎);
2004-9-12
(#1882345@0)
-
We have a old report wroten by c running on mainframe. It can not print align on big font.
-iris_li(iris);
2004-9-12
(#1882382@0)