Help with vector program

This is the program I am currently working on, unfortunately my code is not compiling, and I can not figure out what is wrong with it. Someone help, please! I have an exam coming up and must master these topics.

//Write a program that takes in a number of values that should be input, and then that number of inputs from the keyboard. The program should store the numbers in a vector of doubles. After that, your program should read in a find value and a replace value, and then search through the vector, replacing every instance of the find value with the replace value (not including the first number in the vector). The final operation should be printing the new vector.

#include<iostream>
#include<vector>
using namespace std;

double a, nums, find, replace;

int main()
{

cout << "Enter number of values: " << endl;
cin >> a;

cout << "Enter" << a << "values: " << end;
cin << nums;

vector<double> values(a);
values.pushback(nums);

cout << "Enter find value: " << endl;
cin >> find;

cout << "Enter replace value: " << endl;
cout >> replace;

vector<double> values;
int i;
for(i = 0; i < values.size(); i++)
{
if (values.at(i) == find)
{
values.at(i) == replace;
}
}

cout << values << endl;

}
> unfortunately my code is not compiling, and I can not figure out what is wrong with it.
http://www.cplusplus.com/forum/articles/40071/#msg216270

Also, use code tags
you should probably read the syntax error...im pretty sure it is because it is push_back() not pushback()
You are also declaring the vector values twice.
Topic archived. No new replies allowed.