java - c++同样的代码gcc和vs实现不同,那么我们在写程序时应该用什么编译器?
PHPz
PHPz 2017-04-18 10:03:10
0
2
470

#include <iostream>
#include<conio.h>
#include<cctype>
#include<array>
using namespace std;

int main()

{
    cout<<"input:";
    array<int,10> a;
    double donation;
    cin>>donation;  //这里我输入 字母q
    cout<<donation;

}
PHPz
PHPz

学习是最好的投资!

reply all(2)
Ty80

This completely depends on which platform your program wants to run. In addition, C++ itself is cross-platform. What you are talking about should be the difference between VC++ and Linux C++. Not all C++ codes are implemented differently on Windows and Linux, such as stl, the pure C++ part is the same.

左手右手慢动作

Same as the production environment server. If the production environment is uncertain, it can be made cross-platform. In addition, you are entering a non-number while this is a double... This needs to be filtered in actual situations.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template