Hello WOrld in C
#include <iostream>
#include <vector>
using namespace std;
int main()
{
using MyVector = vector<int>;
MyVector vectorA( 1 );
cout << vectorA.size() << " " << vectorA[0] << endl;
MyVector vectorB( 1, 10 );
cout << vectorB.size() << " " << vectorB[0] << endl;
MyVector vectorC(1,22);
cout << vectorC.size() << " " << vectorC[0] << endl;
return 0;
}
#include <vector>
using namespace std;
int main()
{
using MyVector = vector<int>;
MyVector vectorA( 1 );
cout << vectorA.size() << " " << vectorA[0] << endl;
MyVector vectorB( 1, 10 );
cout << vectorB.size() << " " << vectorB[0] << endl;
MyVector vectorC(1,22);
cout << vectorC.size() << " " << vectorC[0] << endl;
return 0;
}
Comments
Post a Comment