compiler-errors相关内容
以下是一些示例代码: ! Author: Svetlana Tkachenko svetlana@members.fsf.org ! License: GPLv3 or later subroutine myprint(var) ! integer :: var ! print *, 'Hi, my ', var end subroutine module testi
..
在下面的程序中,如果算术表达式出现问题,我们如何让编译器发出警告/错误。 如果算术表达式产生的值超过其类型的最大值,我希望编译器发出警告/错误。 我用gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)编译了下面的程序,使用的编译命令是gcc int_promo_flags.c -Wall -Wextra 我期待来自第long long int y
..
class Stack { private: int tos; const int max = 10; int a[max]; public: void push(int adddata); void pop(); void printlist(); }; 错误:非静态数据成员‘max’的使用无效
..
如果在C++中定义了一个新变量,则可以在初始化表达式中使用该变量的名称,例如: int x = sizeof(x); 函数参数的缺省值怎么办?是否允许在那里按名称引用参数?例如: void f(int y = sizeof(y)) {} 此函数在Clang中被接受,但在GCC中被拒绝,错误为: 'y' was not declared in this scope 演示
..
我下载了没有使用mingw的CodeBlocks17.02并安装了它,然后我从这里(https://mingw-w64.org/doku.php/download)下载了MinGW64,在安装过程中只将体系结构选项从i686更改为x86_64,其余的保留为默认。然后尝试将此路径添加到系统路径:C:Program Filesmingw-w64x86_64-8.1.0-posix-seh-rt_v6-
..
如果我像这样声明枚举... public enum MyEnum : byte { Val1, Val2 } .它起作用了。 如果我像这样声明枚举... public enum MyEnum : System.Byte { Val1, Val2 } .这不管用。编译器引发: 错误CS1008:需要类型byte、sbyte、Short、
..
我下课 class Cdata12Mnt { public: char IOBname[ID1_IOB_PIOTSUP-ID1_IOB_TOP][BOADNAM_MAX + 4]; char ExIOBname[ID1_MAX_INF-ID1_EXIOB_U1TOP][BOADNAM_MAX + 4]; char cflpath[256]; char base
..
我正在使用xCode6 Beta 3,遇到一个问题,在访问自动合成的实例变量时,以前编译得很好的代码(Xcode 5.1.1或xCode6 Beta 2)突然开始给我“使用未声明的标识符”错误: - (void)setFinished:(BOOL)finished { [self willChangeValueForKey:@"isFinished"]; _finished
..
我为这个方程式写了一个c程序, 我正在尝试为上面的公式写一个MPI编程。 #include #include #include double sum(int n); int main(void){ int my_rank,comm_sz, n=1024; double local_sum, total_sum; int source
..
在问题“Left side cannot be assigned to” for record type properties in Delphi上,有来自Toon Krijthe的an answer演示了如何通过在记录的声明中使用属性来完成对记录属性的字段的赋值。为便于参考,以下是由Toon Krijthe发布的代码片段。 type TRec = record private
..
假设我正在编写一个类模板,其某些成员受类型模板参数静态常量数据成员的存在和值的约束: template struct A { constexpr bool operator()() requires T::value { return T::value; } constexpr bool operator()() { return false; } }; #
..
我对此代码使用g++10.2。有人知道为什么我在results3的最后一个std::views::reverse出现编译器错误吗? #include #include int main() { auto values = std::vector{1,2,3,4,5,6,7,8,9,10}; auto even = [](const aut
..
当我想用CMake和最新版本的SFML库一起编译项目时,我发现了很多奇怪的错误(c++)。 C生成代码: cmake_minimum_required(VERSION 3.0) project(MLproject) SET(CMAKE_SYSTEM_NAME Windows) SET(CMAKE_SYSTEM_VERSION 1) SET(CMAKE_C_COMPILER
..
抱歉,如果这个问题不清楚,我甚至正在努力开始调试这个问题。我在MacOS上,现在每次使用clang和-Weverything and -Werror标志编译C程序时都会收到以下错误/警告: error: include location '/usr/local/include' is unsafe for cross-compilation [-Werror,-Wpoison-system-
..
我将此代码视为帮助“Python getting all links from a google search result page”。 当我尝试在Python3.3.3中导入请求时,得到NameError: name 'requests' is not defined。我使用CMD提示符测试了“REQUEST”和“BS4”模块,两者都显示该库已安装。 我正在尝试从Google搜索结
..
我想使用NodeJS制作身份验证应用程序,但得到类似标题的错误:( 但是app.js的代码已经是这样的 var createError = require('http-errors'); var express = require('express'); var path = require('path'); var cookieParser = require('cookie-par
..
我为这个方程式写了一个c程序, 我正在尝试为上面的公式写一个MPI编程。 #include #include #include double sum(int n); int main(void){ int my_rank,comm_sz, n=4; double local_sum, total_sum; int source; M
..
在std::max()函数中使用两个不同的数值变量类型时,c++编译器给出错误有什么原因吗?(例如int和long)。 我的意思类似于:“有时对两种不同的数值变量类型使用std::max()函数时会出现此问题,因此编译器会给出错误以防止此问题”。 推荐答案 编译器产生错误,因为它无法对std::max的模板参数执行类型推导。以下是std::max模板的声明方式:两个参数使用相同的
..
我正在学习C++,我从课本上复制了这段代码,在编译代码的时候,最后出现了一个错误。错误显示: 控件到达非void函数末尾 ,位于代码末尾: #include "ComplexNumber.hpp" #include ComplexNumber::ComplexNumber() { mRealPart = 0.0; mImaginaryPart = 0.0; }
..
由于Next.js自定义文档,我在生成时收到此错误。 因此,在构建期间,我收到一个错误,说我在pages/_document.js中有_document.js。 next/document should not be imported outside of pages/_document.js. See https://nextjs.org/docs/messages/no-docum
..