Questions tagged [declare]

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

642 questions
-2
votes
1 answer

Define an element that points to a same element type in C++

I want to define an element that points to a same element type, something like this: #define Foo { Foo*, ..., ... } For example, this helps me to create a simple tree without creating any auxiliar class: #define TreeNode std::deque(std::pair(char,…
Santiago Gil
  • 1,152
  • 4
  • 17
  • 47
-2
votes
1 answer

C# paste T model class dynamically as variable

I want to store my model class as a variable and use it in all my code dynamically. For example I have something like this: IEnumerable students = GetAllStudents(); Normally I must always declare and retype Student class. But I need to…
-2
votes
3 answers

C++ declaration error

I am currently working with arrays and moving around the data from array to array, however, that isnt the issue the issue is within my void functions more specifically my for loops i dont know why it won't compile when it looks correct to me and I…
Morgan
  • 1
  • 2
-2
votes
1 answer

Fatal error: Cannot redeclare email() previously declared in

I am creating my login page and when I loaded it up I seemed to get this error saying: Fatal error: Cannot redeclare email() (previously declared in /home/a4625512/public_html/core/functions/general.php:2) in…
-2
votes
1 answer

How do I insert the output of these loops into my table?

Declare @PASS char(16) Declare @COUNTER int SET @COUNTER = 0 While @COUNTER < 2 begin select @PASS =replace (replace (replace (replace (replace( …
user1234
  • 21
  • 4
-2
votes
1 answer

Declare Syntax error in Mysql

DECLARE @id uniqueidentifier SET @id = NEWID() When I try to use the above declare to set up unique identifier, I am getting the below error: DECLARE @id uniqueidentifier SET @id = NEWID() Error Code: 1064. You have an error in your SQL…
jack
  • 1
-2
votes
2 answers

Qt declaring member names using a loop

I need to work with 512 individual rectangle items in Qt which I am implementing in a QGraphicsScene. I don't really want to declare all 512 elements manually unless I really have to. At the moment I have something like: QGraphicsRectItem…
Mitchell D
  • 415
  • 7
  • 22
-2
votes
2 answers

Declare scalar variable SQL

My problem is i want to use this local variable inside my update query, is there a way of doing this? DECLARE @listStr VARCHAR(MAX) SELECT @listStr = COALESCE(@listStr+''',''' , '') + cast(int_guid as varchar(max)) FROM ex_in SELECT…
Girre
  • 47
  • 9
-2
votes
1 answer

How can I declare cookie

I am trying to make this code work fine as i can but i couldnt,i am using cookie and i want to rebind my ListView depending on cookie Location but i am getting error message: "Must declare the scalar variable "@Location"." protected void…
Wiliam J
  • 17
  • 6
-2
votes
2 answers

How do I declare an array in bluej?

private Piece[][] board; public cboard(){ this.board = new Piece[8][8]; } public boolean isEmpty(int x, int y){ boolean empty= true; if (board[x][y] != null){ empty= false; } return empty; } …
user3742283
  • 1
  • 1
  • 1
-2
votes
2 answers

declaring a big list of variables

I have a big list of variables: $variable_1 = $_POST['variable_1']; $variable_2 = $_POST['variable_2']; $variable_3 = $_POST['variable_3']; $variable_4 = $_POST['variable_4']; ... .. . $variable_86 = $_POST['variable_86']; What would be the best…
bryan
  • 7,656
  • 12
  • 65
  • 136
-2
votes
1 answer

Declare variables in Microsoft Visual C++?

Where should i declare the variables i like to use in windows forms? private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { int iMyvariable = 1; } private: System::Void button1_Click(System::Object^ …
imi007
  • 23
  • 2
  • 5
-2
votes
1 answer

how to create view with variables inside?

i have some code here but first i want to explane my question. i want to create a view but thats not possible in a view because my SELECT statement hase some variables in it i have seen some answers with function but i dont know how the parameters…
Jeroen
  • 209
  • 2
  • 3
  • 13
-2
votes
1 answer

How i can to declare putStrLn or print in Haskell

my answer is: How can i declare print in function? bisiesto :: Int -> **?**; bisiesto x = if (x `mod` 4 == 0 && ((x `mod` 100 /= 0) || (x `mod` 400 == 0))) then print("Es bisiesto") else print("No es bisiesto"); Please, who can i help me? Thanks.
jordiAnd
  • 129
  • 1
  • 1
  • 8
-3
votes
4 answers

How to declare arrays in python3

I want to declare an array in python3. I tried but I got an error Python 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ip_pb=[] >>>…
Janith
  • 353
  • 3
  • 12
1 2 3
42
43