create a vector

This is what I have come up with so far, but I keep getting errors although I have been working with this for hours now.



#include "stdafx.h"

using namespace Std;

#include"../../../std_lib_facilities.h"
int convert(int x,int y,int z,int g){

int alphabet;

vector<int>myalphabet(3);

int alphabet;



for (int index = 0; index !=4; ++index)

}
cout<<"please enter some number after each prompt"<<endl;

cin>>alphabet;

myalphabet.push_back(alphabet);

}

z= convert(0,1,2,3);

cout<<"the number which you entered one by one are"<<z;

Last edited on
You need the following headers:

1
2
iostream
vector


should be "using namespace std;"

Can you rephrase your question because it is a bit hard to understand
i guess you are working with visual studio, while creating a new project, please uncheck the pre compiled header option, use the headers suggested by Smac89 in ur source files, that will remove the errors.
This is what I have come up with so far, but I keep getting errors although I have been working with this for hours now.

It is useful when you're getting errors if you supply the actual errors you're getting. Nobody here is capable of reading minds.
Topic archived. No new replies allowed.