ITeye博客

上机总结

Jason5563 · 2010-08-02 16:36 · 编程语言 · C · iOS · C++ · C# · Markdown

不少学校的上机都是C++,得重操旧业了。

 

1、string 字符串,

#include<iostream>
#include<string>
using namespace std;

 

输入输出:

cin,cout

 

相等比较,直接==

 

2、文件操作

freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);

如果是绝对地址,则\\

 

3、小数精度控制

 cout.setf(ios::fixed);
 cout.precision(2);

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。