#include <iostream>
#include <deque>
using namespace std;
int main()
{
string str[3]={"程明","程依","钟霞"};
deque<string> St(str,str+3);
cout<<St.front()<<endl;
cout<<St.back()<<endl;
return 0;
}
在VS2005上和VC6.0上都通不过,问一下,这个该如何解决
#include <iostream>
#include <deque>
using namespace std;
int main()
{
string str[3]={"程明","程依","钟霞"};
deque<string> St(str,str+3);
cout<<St.front()<<endl;
cout<<St.back()<<endl;
return 0;
}
在VS2005上和VC6.0上都通不过,问一下,这个该如何解决
#include <iostream>
#include <deque>
#include <string>
using namespace std;
int main()
{
string str[3]={"程明","程依","钟霞"};
deque<string> St;
St.push_back(str[0]);
St.push_back(str[1]);
St.push_back(str[2]);
cout<<St.front()<<endl;
cout<<St.back()<<endl;
return 0;
}