This is my code.After it compiles, the console starts but crashes immediately saying that name.exe has stopped working. warning: extended initializer lists only available with -std=c++11 or -std=gnu++11. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#include<iostream>
#include<conio.h>
#include<string> //introducing string classes.
struct cia
{
std::string name;
std::string code;
float balance;
};
int main()
{
using namespace std;
cia agent[10] =
{
agent[0] =
{ "wallflower",
"007860",
300000
},
agent[1] =
{
"albus",
"117861",
310000
},
agent[2] =
{
"severus",
"227862",
600000
},
agent[3] =
{
"enigma",
"337862",
550000
},
};
string head="\n\t\t\t\t\tCIA";
string username;
string pass;
cout<<head;
cout<<"\n Welcome To The Most Secure network of Justice.";
cout<<"Username-; ";
cin>>username;
getch();
}
Aucun commentaire:
Enregistrer un commentaire