I've made some modifications to your code to help you get started. Furthermore, I recommend taking a look at http://www.cplusplus.com/reference/vector/vector/ for a high-level overview of std::vector and the functionalities it provides.
#include <iostream>
#include <vector>
using namespace std;
int findK(const vector<int> &fs, int M); // Function stub so main() can find this function
int main()
{
int N, M, i; // I'd recommend using clearer variable names
cin >> N >> M;
vector<int> fs;
// Read and add N ints to vector fs
for(i = 0; i < N; i++){
int temp;
cin >> temp;
fs.push_back(temp);
}
int K = findK(nums, M);
cout << "Hello World!" << endl;
return 0;
}
int findK(const vector<int> &fs, int M){ // If you alter fs in make_heap(), remove 'const'
make_heap(fs);
// int b_sz,no_b; // Not sure what these are for...
// int tfs[]=fs; // No need to copy to an array
// make_heap(tfs); // Per above, just pass the vector in