1: c语言之父:丹尼斯.里奇
C++之父:贾本尼.斯特劳斯特卢普
2: 命名空间:在遇到命名冲突时,编译器会提醒,程序员可强制写入A::m_data或者B::m_data.来写入
namespace A
{
const int m_data=1;
}
namespace B
{
cosnt int m_data=2;
}
使用命名空间:using A;
3:
cin=stdin=标准输入 cin>>name;
cout=stdout=标准输出cout<<name;
cerr=stderr=标准错误(错误不可重定向)
Clog=stdprn=打印机
4: c++流成员函数输入cin.get()和cin.getline();
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
char buffer[20];
cin.getline(buffer,20);
cout<<buffer<<endl;
#if 0
char c;
while((c=cin.get())!=EOF)
{
cout.put(c);
}
#endif
return 0;
}