把`using namespace std;`放main外面试试
by Chthology @ 2018-07-15 22:37:18
完全没问题?
不知道你是怎么编译通过的
在include前面加上#,建议吧""替换为<>
using namespace std;写在外面
by YCS_GG @ 2018-07-15 22:37:22
帮忙贴代码
```cpp
#include "stdio.h"
#include <iostream>
int main()
{
using namespace std;
int a, b;
int c;
cin >> a >> b;
c = a / b;
cout << c;
cin.get();
cin.get();
return 0;
}
```
by BB2655 @ 2018-07-15 22:38:13
你cin.get() 不会出bad_alloc?
by scallop @ 2018-07-15 22:40:32
~~码风清奇~~
by xiangling @ 2018-07-15 23:41:11
@[rainman](/space/show?uid=55804)
挺正常的代码风格啊
by GPTTest @ 2018-07-16 08:34:27
@[scallop](/space/show?uid=25739) 不会吧,cin.get()不是和getchar()类似的,你说的是cin.get(char_type *,streamsize)这个函数吧。。
by GPTTest @ 2018-07-16 08:38:27
@[YCS1](/space/show?uid=46099) #是因为makedown当一级标题了
by XiaoX @ 2018-08-02 20:54:27
@[Alaraph](/user/55804) 看书学的
by 滑蒻稽 @ 2020-01-18 21:27:04