簡體   English   中英

如何修復系統找不到在 visual studio 2022 中指定的文件

[英]how can fix The system cannot find the file specified at visual studio 2022

這是舊圖,和下面的代碼不一樣。 在此處輸入圖像描述

 #include<stdio.h>
#include<conio.h>
#include <math.h>

int main(void)
{
    int num, lower, upper;
    double squareroot;
    int square;
    int cube;
    // input value 
    
        do
        {
            printf("the lower value limit is ");
            scanf_s("%d", &lower);
        } while (lower < 0 || lower > 50);

        do
        {
            printf("the upper value limit is ");
            scanf_s("%d", &upper);
        } while (upper < 0 || upper > 50);

        // the formular to find the squareroot, square, cube
        squareroot = sqrt(num);
        square = num * num;
        cube = num * num * num;

            printf("*base number*  ||  *square root*  ||  *square*  ||  *cube*\n");
            printf("*%d*           ||   *%f*      ||   *%ld*      ||  *%ld*\n",
                num, squareroot, square, cube);

        
    
    return 0;

圖片顯示系統找不到指定的文件,當我嘗試重建解決方案時,他們向我顯示了另一個程序問題。 對於另一個程序,我正在那里進行一些更改,但是當我運行它時,我更改的東西並沒有改變

<conio.h>不存在於最新的編譯器中。 你的程序會拋出一個錯誤。 <conio.h>已停產。 很久以前它就被用在 MS-DOS 編譯器中。 請務必在void main() function 的末尾添加一個}

從您在問題下方發布的評論來看,問題的原因如下:

您忽略了“輸出”window 的內容,其中指出構建可執行文件失敗。

“輸出”window 顯示了編譯器生成的所有錯誤消息。 您應該始終准確閱讀這些錯誤消息,如果編譯失敗,您不應該嘗試運行該程序。 否則,您可能會運行舊版本的程序或收到一條錯誤消息,指出它找不到可執行文件。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM