oop tag

60 questions


1 answers
426 views
0
For, while

For statement hap=0for n in range(1234,4568): if n%444 ==0: hap += nprint(hap)How do I change this to a while statement

1 years ago

1 answers
105 views
0
FAILED: ParseException line 1:2 cannot acknowledge input near '('Select' '*'.

FAILED: ParseException line 1:2 cannot acknowledge input near' ('Select' *'said he.What's wrong?( Select * , Cast(Concat(Substr(timestamp, 1, 4), '-', Substr(timestamp, 5, 2), '-', Substr(timestamp, 7...

2 years ago

1 answers
104 views
0
You want to prevent deleting the parent directory (you can delete the child directory)

Thank you for your help.The questions will be asked in two stages.Suppose you have the following directory structure:/parent/user1/parent/user2/parent/user3Each user can delete his or her directory, b...

2 years ago

1 answers
96 views
0
Which is better, class or structure in C++?

When do you write structure and when do you write class?

2 years ago

1 answers
115 views
0
How to break multiple repetitive statements at the same time

From the source code below,Is there a way to get out of the overlapped repeat door at once using break?int main(){ for(int i=0; i<A; i++){ //... for (int j=0 ; j<B; j++) { //... for (int k=0...


1 answers
99 views
0
How to access std::map to auto?

std::vector<int> numbers = { 1, 2, 3, 4, 5, 6, 7 };for ( auto xyz : numbers ){ std::cout << xyz << std::endl;}In C++0x, vector for for if you turn the xyz door like this, int type w...

2 years ago

2 answers
110 views
0
Is there a time when you use Interface instead of an abstract class? And is there the opposite?

It's a general OOP question. I want to make a general comparison between Interface and the basic use of abstraction classes. I want to know the difference between using the interface and using the abs...


1 answers
103 views
0
To remove elements with all null values from an ArrayList or String array

I'd like to remove all elements that have null values from the ArrayList or String array in JavaFor me,for (Tourist t : tourists) { if (t != null) { t.setId(idForm); } }I tried turning around the ...


1 answers
90 views
0
For-each syntax in JavaScript

In Java, there's the same for syntax at the bottom. String[] myStringArray = {Hello,World};for(String s : myStringArray){ //Do something}Is this not available in JavaScript?

2 years ago

2 answers
130 views
0
- 1 - »

© 2024 OneMinuteCode. All rights reserved.