Help fix LNK2019 and LNK1120 errors

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;
}
Last edited on
> coot<<k;
Learn how to spell 'cout'

https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2019?view=msvc-160

While you're at it, after nearly 40 posts, you should know and use this as well.
https://www.cplusplus.com/articles/jEywvCM9/
Last edited on
Thank you!
Hello chebyrek,

It sounds like you are using some version of Visual Studio for your IDE.

In the "Error List" tab on the left side where it lists the error number which is a link that will bring up the Microsoft page about that error.

Andy
chebyrek,

PLEASE learn to use code tags, they make reading and commenting on source code MUCH easier.

http://www.cplusplus.com/articles/jEywvCM9/
http://www.cplusplus.com/articles/z13hAqkS/

HINT: you can edit your post and add code tags.
Topic archived. No new replies allowed.