Questions tagged as 'variables-globales'

3
answers

Differences between x ++ and ++ x in JavaScript [duplicated]

What are the differences between these two expressions? x++ and ++x This is the code I was trying to understand: var x=1, y=1, z=0; do{ z=x+y; console.log("z= "+ z);} while(++x<=1 && y++>...
asked by 05.09.2017 / 11:44
3
answers

Create global variables

I am quite new to the Python syntax in particular such as creating global, nonlocal and local variables and how to declare them without syntax errors . For example in the next program, I have # Estamos creando el juego de Piedra, papel o t...
asked by 23.05.2016 / 21:37
1
answer

I can not use a global variable in main c ++

Class.h: class Clase{ ... } Class.cpp: #include "Clase.h" int var_global; ... Main.cpp: #include "Clase.h" #include <iostream> ... std::cout<<var_global<<std::endl; ... The Problem When using the variabl...
asked by 17.04.2018 / 01:07
4
answers

global variables in c ++

I'm doing a program with functions and a global variable, the idea was to handle a global variable in several functions, I do not know how to do global functions, this is what I try: #include<cmath> #include <stdio.h> #include <...
asked by 24.07.2018 / 02:24
5
answers

Function #define

In a code that uses #define RULE 90, before the function main() , Is there any way that the value of the variable, in this example the 90, is requested when the program is executed, instead of having to enter it in the code, every t...
asked by 17.04.2018 / 10:06
2
answers

Send a variable from PHP to HTML?

I have a problem. I need to send a variable of a file in PHP on my site1, to an html file on my site2. this is the code that I have so far PHP site1 = header ('Location: https://www.sitio2.xyz/ads/ad1/ad'.$variable.'.html'); this...
asked by 05.09.2018 / 14:21
3
answers

Simplify a Javascript Switch

I have the following code: switch (az) { case 0: var azul = "Nivel de Riesgo: [0] Sin Riesgo"; break; case 1: var azul = "Nivel de Riesgo: [1] Poco Peligroso"; break; case 2: var azul = "Nivel de...
asked by 21.03.2018 / 03:46
1
answer

Error with undefined PHP Variable in a site where it is undefined

guys I own a PHP project where I have a file with the functions that must be executed, in this same file I have declaration of the global variables one of these variables is: $usua = $_SESSION['user']['username']; This variable...
asked by 30.11.2018 / 02:45
2
answers

Variable loss in Android Studio

Good, I am trying to use a query to a database, and the truth is that I have several questions, first of all I am very very new to this, so I can understand part of the code, so be patient. I make a query and recover the data from the server,...
asked by 07.08.2017 / 20:28
1
answer

How to retrieve variables from a code qr

Good, I have a QR code in my android application, until the moment it is working as it should, the question is that I require that once you read the code that is being passed to you can handle the variables, until now I have no idea of how to do...
asked by 11.08.2017 / 04:57