initialization tag

16 questions


1 answers
89 views
0
What's the difference between new and parentheses?

When you create an instance of the Test class that I define.What's the difference between the two?Is there a difference?


1 answers
86 views
0
How do I initialize all C++ structure member variables to zero?

Is there an easier way to initialize all object member variables to zero?Now struct Snapshot{ double x; int y ;};int main(){ struct Snapshot mystruct; mystruct.x = 0; mystruct.y = 0;}They're resettin...


3 answers
118 views
0
c Language array initialization question.

When you initialize an array, you can't say intarr[100] = {1, 1, 1, 1, 1...} if there are more than 100 arrays, right? So if you give intarr[100] = {1};, all of these have to be initialized to 1 in a ...

2 years ago

1 answers
61 views
0
C/C++ variable initialization process question

#include <iostream>using namespace std;int main() { int num1, num2; // variable to store two digits from the user inti; // variables for repetition int oddSum = 0; // Variable to store odd sum e...


1 answers
67 views
0
Initialize to 2D array element 0.0C language

When you declare a two-dimensional array dynamic assignment and enter the number of rows and columns, you want all the elements in the array to be initialized to 0.0, but I'm not sure what's wrong. vo...


1 answers
92 views
0
C++ variable initialization, substitution

#include<iostream>using namespace std;int main(){ int i = 10, j = 0,k=0; for (i; i < 31; i++) { for (j; j < 6; j++) k = (i * j) + k; } cout << k << endl;}If you output the v...

2 years ago
« - 2 -

© 2024 OneMinuteCode. All rights reserved.