gives me error on 3rd coded line in search().

#ifndef MY_HT_CHAIN_H
#define MY_HT_CHAIN_H
#include <iostream>
#include <vector>
#include <list>

using namespace std;

class my_ht_chain
{
public:
	//constructor which creates a table of a certain size 
	my_ht_chain(int initTableSize);

	//destructor
	~my_ht_chain();

	//insert a value based on key
	void insert(int key);

	//search for a value based on key
	bool search(int key);

	//delete an item in the list
	void remove(int key);

	//prints out all items stored in hash table
	void show_ht_structure() const;

private: 
	//number of vectors to store in array
	int tablesize;

	//table to store key 
	vector<list<int>>* dataTable;

	//returns a int which corresponds to position in array
	int hashfunction(int key);
};



bool my_ht_chain::search(int key)
{
	list<int>::iterator list1;
	vector<list<int>>::iterator vector1;
	//1. find the array index
	vector1=dataTable->at(hashfunction(key));
	//2. search the list at that array index found above till key matches if not return false
	
}

int my_ht_chain::hashfunction(int key)
{
	return (key%tablesize);
}

gives me error on 3rd coded line in search().

#ifndef MY_HT_CHAIN_H
#define MY_HT_CHAIN_H
#include <iostream>
#include <vector>
#include <list>

using namespace std;

class my_ht_chain
{
public:
	//constructor which creates a table of a certain size 
	my_ht_chain(int initTableSize);

	//destructor
	~my_ht_chain();

	//insert a value based on key
	void insert(int key);

	//search for a value based on key
	bool search(int key);

	//delete an item in the list
	void remove(int key);

	//prints out all items stored in hash table
	void show_ht_structure() const;

private: 
	//number of vectors to store in array
	int tablesize;

	//table to store key 
	vector<list<int>>* dataTable;

	//returns a int which corresponds to position in array
	int hashfunction(int key);
};



bool my_ht_chain::search(int key)
{
	list<int>::iterator list1;
	vector<list<int>>::iterator vector1;
	//1. find the array index
	vector1=dataTable->at(hashfunction(key));
	//2. search the list at that array index found above till key matches if not return false
	
}

int my_ht_chain::hashfunction(int key)
{
	return (key%tablesize);
}

better you can use map

This question has already been answered. Start a new discussion instead.