标签[initialization]

初始化处理初始化数据结构内容的任务。 这是静态类型语言的常见做法。

0
1回复
59

成员初始化列表是否没有定义值?[复制]

This question already has an answer here : 这个问题在这里已经有了答案: Constructor initialization list with empty ini
0
1回复
30

如何在Kotlin中检查Date实例初始化成功与否?

I am coding a function to check if an Integer x is UNIX timestamp format or not.我正在编写一个函数来检查整数x是否是 UNIX 时间戳格式。 Current I'm think the solution is check
-1
0回复
25

在创建对象和变量修饰符/(只是改变变量的东西)时遇到问题。低级/简单代码。任何帮助表示赞赏[关闭]

Closed . 关闭。 This question needs to be more focused . 这个问题需要更加集中。 It is not currently accepting answers.
1
3回复
35

c-如何在c中的结构中初始化匿名联合

I want to initialise all three arrays of mainstr , can anyone help me to initialise this anonymous union inside the struture?我想初始化 mainstr 的所有三个数组,谁能帮
11
2回复
246

为什么unsignedchar具有与其他数据类型不同的默认初始化行为?

I am reading through the cppreference page on default initialization and I noticed a section that states something along these lines:我正在阅读有关默认初始化的 cpp
-1
1回复
38

8的乘法表中出现的数字总和。我的代码有什么问题?理想的输出是440,我得到33204

Sum of numbers occurring in the multiplication table of 8. What's wrong with my code? 8 的乘法表中出现的数字总和。我的代码有什么问题? Desirable output is 440, and I'm getti
-1
1回复
27

与while循环相关的变量范围显示错误,而在while循环之后访问它显示错误

import java.util.*;public class gcd { public static void main(String[] args){ Scanner scn = new Scanner(System.in);
2
3回复
81

为什么编码器将结构指针的值分配给静态结构?

Apologies if this is a duplicate, in which case I couldn't find the right keywords to search.抱歉,如果这是重复的,在这种情况下,我找不到要搜索的正确关键字。 This is in reference to
0
0回复
18

如何实现具有成员变量向量的A类的构造函数,这是它的基本函数,使用了初始化列表和模板?

So the problems are:所以问题是: Class Stan must have a constructor that enables it to recieve and store unlimited nubmer of elements and it has to be impl
0
0回复
61

初始化字符串向量

I'm trying to initialize a vector of strings (from Stroustrup Programming p 375):我正在尝试初始化一个字符串向量(来自 Stroustrup Programming p 375):vector<string>
0
2回复
48

如何在C++初始值设定项列表中将常量引用成员初始化为另一个成员(标准向量)

I did the following as a cheap way to allow read-only access to a member container _numbers via numbers :我做了以下作为允许通过numbers对成员容器_numbers进行只读访问的廉价方法:cl
0
0回复
31

C++初始化:无括号vs空括号

What's the difference between Foo foo; Foo foo;什么区别Foo foo; and Foo foo{};和Foo foo{}; ? ? (and why user-defined ctor matters, as shown below) (以及为什么用户
0
0回复
29

每次更改参数时都用新参数重新初始化类的实例

How do I re-initialize / instantiate a model that takes one parameter every time that parameter changes its value?我如何重新初始化/实例化一个模型,该模型每次更改其值时都会采用一个参数?
0
1回复
26

Firebase未正确初始化,所需文件夹中的“GoogleService-Info.plist”文件

My app working correctly on Android but I have exception on iOS.我的应用程序在 Android 上正常运行,但在 iOS 上有异常。 The iOS build was done on Codemagic. iOS 构建是在 Codem
-1
0回复
22

为什么预制件不会在光子网络上的两个玩家视图上实例化?

I want the dice prefab to be visible to both players.我希望骰子预制件对两个玩家都可见。 Currently the dice are visible separately in the views but not together in the
-1
1回复
45

创建包含其他对象并传递给要添加到向量的函数的对象的不同方式之间是否存在差异

If we have a clas that contain vector of objects of other class如果我们有一个包含其他类对象向量的类 class BigClass { private: vector<ClassName> vec;
0
0回复
16

如何在ascx中正确发送更新请求

I have an ASP.net control and am learning about its lifecycle.我有一个 ASP.net 控件并且正在了解它的生命周期。 However I am confused about how to properly make an update
-1
1回复
33

在Swift中初始化类的属性

Why does this code work:为什么这段代码有效:class EquilateralTriangle { var sideLength: Double = 3.0 var perimeter: Double { return 3.0 * sideL
0
4回复
74

我可以在C++中创建不同数据类型的构造函数吗?[关闭]

Closed. 关闭。 This question is not reproducible or was caused by typos . 此问题不可重现或由拼写错误引起。 It is not currentl
0
1回复
29

代码运行时崩溃,编译初始化,成员变量指向随机地址,无法访问[重复]

This question already has answers here : 这个问题在这里已经有了答案: What is The Rule of Three? 三分法则是什么? (8 an

1 2 3 4 5 6 7 8 9 10 下一页