LNK 2019, LNK 1120 해결방법을 모르겠습니다. 도와주세요!

-@Naver의 이미지

처음 작성해서 이렇게 올리는게 맞는지 모르겠어요. 문제되는 것이 있을 시에는 삭제하도록 하겠습니다!
아래 제가 작성한 코드인데 자꾸 LNK 2019, LNK 1120 오류가 떠서 맞게 짠건지 확인을 못하고 있어요.
뭐가 잘못된 것인지 알려주세요ㅠㅠ 참고로 c 프로그래밍 visual studio입니다!

#define _CRT_SECURE_NO_WARNINGS
#include

void print_menu();
void print_bin(int dec);
void print_q(int dec);
void print_oct(int dec);
void print_hex(int dec);

int main(void) {
do {
print_menu();

int cmd, dec;
printf("입력:");
scanf_s("%d", &cmd);

if (cmd <= 0 || cmd >= 6) {
continue;
}
if (cmd == 5) {
break;
}
prinf("input a decimal:");
scanf_s("%d", &dec);

if (cmd == 1) {
print_bin(dec);
}
else if (cmd == 2) {
print_q(dec);
}
else if (cmd == 3) {
print_oct(dec);
}
else if (cmd == 4) {
print_hex(dec);
}
} while (1);

return 0;
}

void print_menu() {
printf("1. 2진수 출력\n");
printf("2. 4진수 출력\n");
printf("3. 8진수 출력\n");
printf("4. 16진수 출력\n");
printf("5. 종료\n");
}

void print_bin(int dec) {
int i, b;
for (31 > i; i = 0; i--) {
b = (dec >> i) & 1;
printf("%d", &b);
if (i % 8 == 0) {
printf(" ");
}
}
printf("\n");
}

void print_q(int dec) {
int i, q;
for (15 > i; i = 0; i--) {
q = (dec > i * 2) & 11;
printf("%d", &q);
if (i % 8 == 0)
printf(" ");
}
printf("\n");
}

void print_oct(int dec) {
int i, o;
for (15 > i; i = 0; i--) {
o = (dec > i * 3) & 111;
printf("%d", &o);
if (i % 8 == 0)
printf(" ");
}
printf("\n");
}

char hexname[17] = "0123456789ABCDEF";

void print_hex(int dec) {
int i, h;
for (7 > i; i = 0; i--) {
h = (dec > i * 4) & 0xF;
printf("%c", hexname[h]);
if (i % 8 == 0)
printf(" ");
}
printf("\n");
}

익명 사용자의 이미지

scanf_s 함수 원형을 확인해보세요.
그리고 메인 함수를 맨 밑에 위치시키세요

익명 사용자의 이미지

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

일단 위 가이드라인을 따라 보시길. 소스 코드만 봐서는 원인을 찾기 쉽지 않겠군요.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.