Questions tagged [declare]

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

736 questions
-1
votes
2 answers

C - Declare a file in function parameters

so here is my problem : int isopen() { int fd; fd = open("myfile", O_RDONLY); if (fd == 0) printf("file opening error"); if (fd > 0) printf("file opening success"); return(0); } int main(void) { isopen(); …
-1
votes
1 answer

'accelerometer' and 'lcd' not declared in this scope

It's telling me that "accelerometer" and "lcd" were not declared in this scope when they're used in PIT0_IRQHandler. None of the solutions I've found online have worked as of yet so I figured I'd just post it up. I'm pretty new to this as well so…
Davies
  • 1
  • 1
-1
votes
3 answers

How to create a boolean in SQL that is checked every time I call it

Let's say I have a table with 3 columns; people's salaries, how much they spend in a year, and their credit score. Next, let's say I want to flag people with low salaries, who spend most of what they earn, and who also have bad credit scores. When…
Greg G
  • 1
  • 3
-1
votes
3 answers

How to name a Thread multiple times and use it in Java

I have a class which has a runnable thread in it. I send a variable to this class more than one time at the same time. The class has run() method and starts own thread for the variable sent from another class. After some processes, i need to stop…
Yasin Bilir
  • 194
  • 3
  • 17
-1
votes
1 answer

PHP writing dynamic files with $_SESSION declaration fails

I am trying to generate a dynamic file with php. Within this code, I need to declare some $_SESSION variables. For instance, the redirect url on refresh etc. However, when I try to declare the $_SESSION variable and use fwrite, it fails to generate…
-1
votes
1 answer

should be declared as a file name

My teacher is away for 2 days and I'm stuck. I keep getting these two errors when I try to run the main file U:\Computer science\AP Computer Science\10.boolean\lab10_boolean\PassRunner.java:8: error: class Lab10a is public, should be declared in a…
Emmanuel
  • 11
  • 1
  • 6
-1
votes
1 answer

How to Declare and use ComboBoxes in a Windows Form in VB for Visual Studio Express 2013

I'm making a program for the cinema in which you select a movie, number of people (adults, children, teens, seniors) and whether or not you have a loyalty card. The aim is the program takes the number of people and the movie into account, calculates…
-1
votes
1 answer

SQL Query - Declare a list of names

I need to start out by apologizing for my ignorance on this, but I'm really supposed to be the network guy here. Anyway... I'm trying to query a couple of tables using inner joins to find who was the person assigned to an item at a specific time…
-1
votes
1 answer

MSSQL to MYSQL conversion

I have a MSSQL query and would like to convert it to MySQL version. But I have an error in my console: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near…
XTRUST.ORG
  • 3,280
  • 4
  • 34
  • 60
-1
votes
1 answer

SQL Server: how to declare and set variable in dynamic procedure

I would like to declare and set a variable as part of a dynamic procedure. I am new to this so the following is just to indicate what I am trying to achieve. Can someone show me how to write this correctly (just regarding these lines)…
Mike
  • 815
  • 7
  • 15
  • 23
-1
votes
1 answer

Must declaret the scalar variable exec

USE [Kn_online] GO /** Object: StoredProcedure [dbo].[LOAD_KNIGHTS_SIEGE_WARFARE_USERS] Script Date: 04/12/2014 13:51:24 **/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[LOAD_KNIGHTS_SIEGE_WARFARE_USERS] …
-1
votes
1 answer

Oracle SQL declare given date as variable

I am trying to declare a variable that represents a date, my code looks like this: declare mydate date; begin select TO_DATE('01.01.2014 00:00:00','DD.MM.YYYY HH24:MI:SS') into mydate from dual; end; --then comes code like this, the code…
Florian Chrometz
  • 445
  • 2
  • 9
  • 22
-1
votes
2 answers

Declaring two namespaces in the one file

As said in the php reference Namespaces are declared using the namespace keyword. A file containing a namespace must declare the namespace at the top of the file before any other code - with one exception: the declare keyword. But further…
user2953119
-1
votes
1 answer

Error : expected a ";"

Well this is a silly question but I have this error : #include std::unordered_set ValidValues **{**"one", "two", "three"}; Error : expected a ";" appears at the first bracket. Exacty the same with a "set". Restarted…
Mr. Starck
  • 232
  • 6
  • 16
-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