Project scenario:
use VS to program in C language and generate solution report – > Execution error
Problem Description:
error: link: fatal error lnk1168: unable to open C:\users\86139\desktop\plan\notes\C\tryproject \ debug\tryproject.exe for writing
#include <stdio.h>
#include "math.h"//Since the library function sqrt() is to be used
int main(){
//Requirement: determine if the quadratic function has real roots, and output if it does?
double a,b,c,disc,x1,x2,p,q;//declare variables
printf("Please enter the values of a,b,c respectively: \n");
scanf("%lf%lf%lf",&a,&b,&c);//enter the value and store it at address a,b,c
disc=b*b-4*a*c;//discriminant
if(disc<0){
printf("This equation has no real roots!!!");
}else{//disc>=0
p=-b/(2.0*a);
q=sqrt(disc)/(2.0*a);
x1=p+q;
x2=p-q;
printf("此方程的两实根为:\nx1=%7.2f\nx2=%7.6f\n",x1,x2);
}
}
Cause analysis:
the process may already exist, so it cannot be opened and run
Solution:
just finish the process of the program. You can open “process manager” (Task Manager), Ctrl + Alt + delete, find the corresponding process, and right-click to finish.
Read More:
- LINK : fatal error LNK1104: Cannot Open the File “mfc90ud.lib”
- [Solved] fatal error C1083: Could Not Open Unable to open include file:“stdint.h”: No such file or directory
- [Solved] Fatal error C1083: unable to open include file: ‘d3dx9.h’
- [Solved] Visual studio 2022 error LNK2019: unable to resolve external symbol for
- [Solved] Open3d error: unable to display image using open3d
- PIP Fatal error in launcher: Unable to create process using
- fatal: unable to access”: The requested URL returned error: 500
- VS Open the UI file of QT Crash and Report Error [How to Solve]
- [Solved] NO ST-LINK detected/ST-LINK USB communication error
- [Solved] fatal error C1083: Cannot open included files: “stdafx.h”: No such file or directory
- [Solved] Mac VS Code fatal error: ‘bits/stdc++.h‘ file not found
- VSCode Unable to find custom header file directory: fatal error: no such file or directory
- How to Solve OpenCV CVUI Error: LINK2019
- Gog cannot link PSN: the connection to the server timed out
- How to Solve QT error: LNK1158: Cannot Run “rc.exe”
- How to Solve J-link Error (Two Command Errors & Solution)
- Solve error LNK2001 about pcl::io::vtkPolyDataToPointCloud
- Error lnk2038: detected “_ ITERATOR_ DEBUG_ Mismatched ‘level’ value of ‘0’
- [Solved] Error reading comm device when writing serial communication with MSComm control
- [Solved] C++ Compile: error LNK2019: unresolved external “XX“