or tag

453 questions


1 answers
95 views
0
Why do you define a constructor with parameters and the default constructor without parameters disappears?

If you create a constructor with parameters in C#, C++, and Java, the default constructor without parameters disappears.Before, I thought it was just like that, but I suddenly became curious about why...


1 answers
105 views
0
To store references in a vector?

std::vector<int &> hello;If you try to save references of int together error C2528: 'pointer' : pointer to reference is illegalAn error appears.I'm not good at using a pointer, so I'm going ...

2 years ago

2 answers
96 views
0
Picking data from two lists with Python for syntax and writing to a text file.

ocost = [10,11,40,4,5]buy_list = ['a32','a11','a45','b30','c43']def update_list(self, list): f = open(list1.txt, at) for opencost in ocost: for code in buy_list: f.writelines(code;+code+cost;+opencos...

2 years ago

1 answers
77 views
0
Does "new int[0]" allocate memory?

On my computer,cout << new int[0] << endl;When I ran , I printed 0x876c0b8.I think I'm allocating memoryAssigning [0] means assigning empty. Personally, I thought there would be an error, ...


1 answers
90 views
0
How do I eterate multiple iterables at the same time?

When there are two iterables, each element is paired foo = (1,2,3)bar = (4,5,6)for (f,b) in some_iterator(foo, bar): print f: , f ,; b: , bUse this code to make a result f: 1; b: 4f: 2; b: 5f: 3; b: 6...


1 answers
92 views
0
What is the best way to repeat Cursor on Android?

Cursor cursor = db.rawQuery(...);cursor.moveToFirst();while (cursor.isAfterLast() == false) { ... cursor.moveToNext();}Cursor cursor = db.rawQuery(...);for (boolean hasItem = cursor.moveToFirst(); h...

2 years ago

1 answers
54 views
0
Error after Android update

An error occurred after updating Android from 2.2 to 2.3.In previous versions, the returned project or the newly created Empty project in 2.3 will not be installed in AVDI looked everywhere, and I tri...

2 years ago

2 answers
73 views
0
The value of the result of the for repeat statement in Playground during swift study is strange.

I am studying swift. I'm asking you a question because it's weird to use the for statement to practice the book example with playground. for var i = 0; i < 10; i++ { print(\(i) execute)}Result valu...

2 years ago

1 answers
124 views
0
I assigned an array with new, but the last value of the array cannot be entered.

#include <iostream> using namespace std ; class Matrix { int** values; int row, column; public: Matrix(int row = 0, int column = 0) { this->row = row; this->column = column ; } Matrix ...


1 answers
99 views
0
Why do you use an editor, not an index?

//code1for (int i = 0; i < some_vector.size(); i++){ //...}//Code2for (some_iterator = some_vector.begin(); some_iterator != some_vector.end(); some_iterator++){ //...}Usually, when you use a conta...

2 years ago
« - 29 - »

© 2024 OneMinuteCode. All rights reserved.