[英]Project will not build
So it took me a while to find a codeblock with a compiler but in the end I found one... I wrote a very simple code (learning) 因此,我花了一段时间才找到带有编译器的代码块,但最终我找到了一个...我编写了一个非常简单的代码(学习)
//
// Conversion - Program to convert temperature from Celsius degrees to
Fahrenheit : Fahrenheit = Celsius * (212 - 32)/100 + 32
//
//
//
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{
// enter the temperature in Celsius
int celsius;
cout << "Enter the temperature in Celsius:";
cin >> celsius;
// calculate conversion factor for Celsius
// to Fahrenheit
int factor;
factor = 212 - 32;
// use conversion factor to convert Celsius
// into Fahrenheit values
int fahrenheit;
fahrenheit = factor * celsius/100 + 32;
// output the results (followed by a NewLine)
cout << "Fahrenheit value is:";
cout << fahrenheit << endl;
// wait until user is ready before terminating program
// to allow the user to see the program results
cout << "Press Enter to continue..." << endl;
cin.ignore(10, '/n');
cin.get();
return 0;
}
but I keep getting this error 但我不断收到这个错误
-------------- Build: Debug in Conversion (compiler: GNU GCC Compiler)--------------- --------------构建:转换中的调试(编译器:GNU GCC编译器)---------------
x86_64-w64-mingw32-g++.exe -o bin\\Debug\\Conversion.exe obj\\Debug\\main.o x86_64-w64-mingw32-g ++。exe -o bin \\ Debug \\ Conversion.exe obj \\ Debug \\ main.o
Execution of 'x86_64-w64-mingw32-g++.exe -o bin\\Debug\\Conversion.exe obj\\Debug\\main.o' in 'C:\\CPP_Programs_from_Book\\Conversion' failed. 在'C:\\ CPP_Programs_from_Book \\ Conversion'中执行'x86_64-w64-mingw32-g ++。exe -o bin \\ Debug \\ Conversion.exe obj \\ Debug \\ main.o'失败。
will not build 不会建立
ps im using code::blocks PLZ how do I fix this ps im使用code :: blocks PLZ我该如何解决
It seems that a comment has been left uncommented. 似乎未发表评论。
//
// Conversion - Program to convert temperature from Celsius degrees to
Fahrenheit : Fahrenheit = Celsius * (212 - 32)/100 + 32
//
Should be 应该
//
// Conversion - Program to convert temperature from Celsius degrees to
// Fahrenheit : Fahrenheit = Celsius * (212 - 32)/100 + 32
//
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.