2014-12-09 82 views
0

我是C編寫的程序,我使用的功能flushall_ 是在視覺2013和快遞使用,並不停地給我的錯誤:LINK錯誤2019

 
    Error 1 error LNK2019: unresolved external symbol _flushall_ referenced in function _main C:\Users\Naya123\Desktop\proj1\proj1\q1.obj proj1 

我也tryed複製代碼到一個新的項目,也是我從代碼中刪除功能flushall_但還是一樣

代碼(其唯一的主):

#include<stdio.h> 
#include<math.h> 
#include<string.h> 
void main() 
{ 
    char option; int num1, num2, num3,count=0,num,base; 
    menue(); 
    scanf_s("%c",&option); 
    while (option != 'Y' || option != 'y') 
    { 
    switch (option) 
    { 
    case 'a' : 
    case 'A': 
     printf("insert first number : "); scanf_s("%d", &num1); 
     printf("insert seconde number : "); scanf_s("%d", &num2); 
     printf("insert third number : "); scanf_s("%d", &num3); 
     printf("the max between these three is %d \n ", max(num1, num2, num3)); 
     break; 
    case 'B' : 
    case 'b': 
     printf("insert first number : "); scanf_s("%d", &num1); 
     printf("insert seconde number : "); scanf_s("%d", &num2); 
     printf("insert third number : "); scanf_s("%d", &num3); 
     printf("the min \n"); 
     //printf("the min between these three is %d \n ", min(num1, num2, num3)); 
     break; 
    case 'C': 
    case 'c': 
     printf("insert number : "); scanf_s("%d", &num); 
     if (is_positive(num) == ERROR) 
     { 
      printf("Error back to menue \n"); 
      break; 
     } 
     else { 
      printf("the oposite of the number is %d \n ", oposite(num)); 
      break; 
     } 
    case 'D': 
    case 'd': 
     printf("insert number : "); scanf_s("%d", &num); 
     if (is_positive(num) == ERROR) 
     { 
      printf("Error back to menue \n"); 
      break; 
     } 
     else { 
      printf("the oposite of the number is %d \n ", (is_polendrom(num)== 0) ? "the number isn't a polindrom \n" : "the number is a polindrom \n"); 
      break; 
     } 
    case 'E': 
    case 'e': 
     printf("insert number : "); scanf_s("%d", &num); 
     if (is_positive(num) == ERROR) 
     { 
      printf("Error back to menue \n"); 
      break; 
     } 
     else { 
      printf("insert the base: "); scanf_s("%d", &base); 
      printf("the number in a detcimal base is %d \n ", numByBase10(num,base)); 
      break; 
     } 
    case 'F': 
    case 'f': 
     printf("insert number : "); scanf_s("%d", &num); 
     if (num < 0) 
      num = (make_bolindrom(-1 * num))*-1; 
     else num = make_bolindrom(num); 
     break; 
    case 'G': 
    case 'g' : 
     printf("DoYou Really want to quit? y/n \n"); 
     option=getchar(); enter=flushall_(); 
     if (option == 'Y' || option == 'y') 
      printf("thx for using the system ! byee \n"); 
     else 
      menue(); 
     break; 
    } 
    if (option != 'Y' || option != 'y') 
    { 
     menue(); 
     scanf_s("%c",&option); 
    } 
    } 
} 
+0

沒有這樣的功能。 – 2014-12-09 13:02:03

+0

使用_flushall()或flushall(),而不是flushall_() – Joachim 2014-12-09 13:03:12

+0

「我從代碼中刪除函數flushall_但仍然是」 - 顯然不是。學會使用你的IDE。 – 2014-12-09 13:04:31

回答

1

功能被命名爲_flushall,而不是flushall_。

此外,如果調用未聲明的函數,則應啓用更高的警告級別以獲取警告。這將幫助您檢測問題的原因。