Questions tagged [declare]

Use this tag for questions related to declare, which is usually meant for declaring variables, statements, etc.

642 questions
-1
votes
2 answers

2D Vector with 3 columns and undeclared number of rows

How to declare a 2D Vector with following specifications: Should have 3 columns (Ofcourse not actually but still) Number of rows undeclared Some suggest i should wrap an array inside a vector as below: typedef array
-1
votes
1 answer

How to select value of variable in ORACLE

Below is the SQL Server's syntax to select variable as a record DECLARE @number AS INTEGER; SET @number = 10; SELECT @number; How can I do this in ORACLE? Thanks in advance. Regards, Sagar Nannaware
-1
votes
2 answers

PHP: using a switch to declare a string. Is this possible?

In the following code: $num = Rand (1,2); switch ($num) { case 1: $var1 = "first value"; break; case 2: $var1 = "second value"; break; } My next part of coding needs the $var1 to be included inside an array of Jobs. Any idea how I would do this.…
-1
votes
1 answer

Need help finding documentation for Ruby's declare method

Can someone tell me what this method does or where I can find documentation on it? declare :percentage, [:value] It's difficult to research this one because I keep getting documentation about declaring variables, methods, etc. Thanks!
-1
votes
1 answer

Passing 2 matrice of unknown sizes as parameters

First - my code that works: void main(){ int mat1[5][5]={{1,2,3,4,5}, {6,2,5,5,6}, {1,5,6,6,7}, {4,5,6,7,8}, {5,6,7,8,9}}; int mat2[3][3]={{1,2,3}, {2,3,4}, …
Muli Yulzary
  • 2,499
  • 3
  • 18
  • 37
-1
votes
1 answer

bash -declare documentation

If you declare an array like this declare -a test you can echo the value like this i=2 echo ${test[i]} or i="1+1" echo ${test[i]} why the second form is accepted? i need a complex answer thanks
Wisp Ever
  • 35
  • 5
-1
votes
1 answer

How to declare ip address to use it with multiple functions?

I'm implementing a simple client-server program. Some parts of the i wrote is: int main(void){ using namespace boost::asio; using namespace std; const std::string ip = "localhost"; const int port = 10500; ip::address…
-1
votes
4 answers

Declare variable outside of javascript file and use it in file

so i am declaring a variable inside of a .php file But i…
Tim Daubenschütz
  • 1,676
  • 4
  • 19
  • 37
-2
votes
1 answer

Declare array of UIButtons

I want my swift code to create buttons using colors. I know I want to declare array but some of the things I have tried are not working. What I tried below is not working. I have tried to do various forms of wrapping but it did not work. The goal of…
Sam Burns
  • 97
  • 1
  • 7
-2
votes
1 answer

How to declare object with different name in Javascript?

Let's say i declaring an object let Mahasiswa = { name: "Steve", age: 22 } And then later in my code i copy these code with same name; let {name, age} = Mahasiswa; console.log(name, age) // Steve 22 but how do i change it to different…
trp
  • 11
  • 1
  • 1
  • 3
-2
votes
1 answer

How to declare an array list?

The objective is trying to create a code that gets the difference of the max and min number of the Array List. As a beginner I am having trouble understanding why I get that maxRange is not declared in my code. private int firstElement; public…
-2
votes
1 answer

Static variable to thread C#

In the class program i declare a couple of integers. In the Mains method they get a value. These values are used in the telbereik method, but when the thread starts these values reset to 0. I want them to have the value that is given by the user in…
-2
votes
1 answer

'' was not declared in this scope

I wrote this program for the college. The user must input 2 numbers (n,m) and the program must make an array with the size [n,m]. Then the user will fill the array and the program must find the maximum number of the columns and print the minimum of…
-2
votes
4 answers

C++ Getting an error with my functions

Need some homework help. I'm new to C++, and I'm getting an error I don't understand. Here's my code: /* * homework6.cpp * Coder: omega9380 * Final Project */ #include #include #include using namespace std; int…
-2
votes
3 answers

PLSQL Variables

I'm new to programming and I was wonder how I would declare a variable I can use through out my code. What I want to achieve is : Myvariable = (select Column from table1 where column =1234 group by column); select column from table2 where column in…
Oxy111
  • 67
  • 7