由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - two general C++ question
相关主题
C#的formated output有点不方便呀。。。。 请问c++为什么会编译失败?
问个c++问题谁来解释一下这个是compiler问题吗?
C++ formatted output questiona C++ interview question..........
Linux GNU C, readlink问题C++格式输出
帮忙找个错Overridden function will cause function shadow in C++, but not in Java
很不习惯cin/coutc++ 中如何把str转换为float?
How to have another func call printf with va_arg list ?问一个C++下的Bug(Linux下)
C/C++函数调用和栈内存[合集] 这段C++程序哪种写法是正确的
相关话题的讨论汇总
话题: c++话题: functions话题: printf话题: sprintf话题: system
进入Programming版参与讨论
1 (共1页)
w******g
发帖数: 67
1
We know "printf" and "system" are "C" functions. Although we can use them in
C++, I wonder
1.For formatting the output and string, are there similar functions like "
printf" and "sprintf" in C++?
2.For running external program in C++, are there similar functions like "
system" and "popen" in C++?
w***g
发帖数: 5958
2
sprintf和system也是标准的C++函数,只不过要用.虽然他们不是
面向对象的,但是他们和cin, cout一样写在了C++标准中。boost::format是sprintf的
一个比较好的替代品。

in

【在 w******g 的大作中提到】
: We know "printf" and "system" are "C" functions. Although we can use them in
: C++, I wonder
: 1.For formatting the output and string, are there similar functions like "
: printf" and "sprintf" in C++?
: 2.For running external program in C++, are there similar functions like "
: system" and "popen" in C++?

c*******g
发帖数: 771
3
1 (共1页)
进入Programming版参与讨论
相关主题
[合集] 这段C++程序哪种写法是正确的帮忙找个错
G++用-g和-O3编译运行结果竟然不一样很不习惯cin/cout
[合集] 一道C++面试题 (转载)How to have another func call printf with va_arg list ?
question on divide by zeroC/C++函数调用和栈内存
C#的formated output有点不方便呀。。。。 请问c++为什么会编译失败?
问个c++问题谁来解释一下这个是compiler问题吗?
C++ formatted output questiona C++ interview question..........
Linux GNU C, readlink问题C++格式输出
相关话题的讨论汇总
话题: c++话题: functions话题: printf话题: sprintf话题: system