I have a code that has two errors LNK2019 and LNK1120. Searches on the Internet did not yield a solution. How can I resolve these errors?
#include <cstdio>
#include <iostream>
int main()
{
int n;
char h;
cin>>n>>h;
char* a = new char[n];
int k, i = 0;
while (i < n)
{
cin>>a>>k;
i += k--;
}
do
k -= *a != h;
while (*++a);
cout<<k;
return 0;
}