Sorry, that wasn't meant to be a solution; just informative. Personally, I'd probably create a temp variable for the input, then use the push_back method, like k5054 suggested.
Something like this, perhaps:
#include <iostream>
#include <iomanip>
#include <vector>
using namespace std;
int main()
{
std::vector<std::string> user_details_confirmation{};
std::vector<std::string>setup_file_contents_vec{ "timmy", "jimmy" };
for(auto& iter : setup_file_contents_vec)
{
cout << " setup_file_contents_vec: " << iter << std::endl;
}
std::string input_value;
std::cout << "First Name : ";
std::cin >> input_value;
user_details_confirmation.push_back(input_value);
std::cout << "user_details_confirmation: " << user_details_confirmation[0] << std::endl;
std::cout << "setup_file_contents_vec: " << setup_file_contents_vec[0] << std::endl;
if(user_details_confirmation[0] == setup_file_contents_vec[0])
{
std::cout << "EQUAL";
}
return 0;
}