Most voted "parameters" questions
Parameters are a type of variable used in the subroutine to refer to the data provided as input to the subroutine.
Learn more…208 questions
Sort by count of
-
1
votes1
answer173
viewsError in covering from int to int*
I wanted to know why you are causing the error: Error converting int to int*' This program is only for training the use of pointers in parameters. void teste(int *t){ *t = 50; } int main(){ int x =…
-
1
votes1
answer510
viewsHow to turn pointer into matrix
I’m doing a program that transforms a matrix into a transposed matrix. I am using 3 functions because I want to learn how to pass parameters of arrays. The function main() calls the function…
-
1
votes2
answers223
viewsAre parameters with vectors in Java always by reference?
I am aware that, in Java, any parameter passage of an object is by reference, already with primitive types, by value. However, I was left with doubt about the common vector. I don’t mean the class…
-
1
votes1
answer66
viewsHow to change the value of an entire argument passed as a reference in Julia
function muda_o_valor_do_inteiro!(x::Int64) x = 10 end a = 9 muda_o_valor_do_inteiro!(a) println(a) # a deveria possuir o valor 10 I have already understood that with vectors I can modify the value…
-
1
votes2
answers107
viewsHow does a function know how to take the elements of an array if they are not being passed to the function?
Hello, the following code is correct, but I would like to understand one thing: const Carros = ['Mercedes', 'Ferrari', 'BMW'] function imprimir(nome, indice){ console.log(`${indice + 1}. ${nome}`) }…
-
1
votes1
answer1212
viewsDynamic matrix as parameter in C or C++?
After hours of searching, I didn’t find anything that would answer my question, or I couldn’t understand the answer. I want to create a matrix NxN variable size. I made with pointers,but I want to…
-
1
votes3
answers160
viewsUse string to reference variable
I wish to move on to the function execSQL the name of the variable I want to use in base.consulta() and from the string SQL, directly pass the variable to the function base.consulta(), that is, pass…
-
1
votes1
answer861
viewsPassing array as a function parameter
How to pass a array to a function without me having to inform the amount of indexes it has? Stating the size #include "stdafx.h" #include <Windows.h> void imprimir(int _array[], int _tamanho)…
-
1
votes2
answers83
viewsWhy do we use parameters/arguments in functions?
If a function can see environment variables, that is, it can see variables defined in the main program. Why we pass parameters and arguments to this function? In the example below, I wrote an…
-
1
votes1
answer859
viewsThymeleaf passing 2 parameters to URL
Good evening, everyone, I have the following problem: I am trying to pass 2 parameters in the URL using Thymeleaf, but I am not able to recover the value of the variable "name" to pass in the second…
-
1
votes1
answer39
viewsIncompatible types when trying to start a class with the "switch" value of another Java
I got the following: public class Bullet { public enum Direcao { UP,DOWN,LEFT,RIGHT }; // Posição do tiro em pixels. private int x,y; // Direção do tiro. private Direcao direção; // Este tiro está…
-
1
votes2
answers101
viewsWhat reason does the "missing()" at the end of the program send me an error in which it is not possible to compile?
Main Nota estudante = new Nota(); estudante.Matricula = Console.ReadLine(); estudante.Nome = Console.ReadLine(); estudante.Idade = int.Parse(Console.ReadLine()); estudante.Prova1 =…
-
1
votes1
answer70
viewsPassing parameters using primitives or an object containing the fields?
When creating the signature of a method, what would be the best design option for passing parameters? Is there any good practice that addresses the signing of methods? What would be better? For each…
-
1
votes2
answers41
viewsDoubts with this function
I have this code in javascript and want to ask some questions: HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport"…
-
1
votes1
answer698
viewsHow to pass matrix as parameter in C?
Hello. In general, I know that to pass an array as a parameter of a function in C, we have to specify the size of its dimensions. But this makes the function less generic. I was thinking of using…
-
1
votes1
answer218
viewsError passing numpy.core. _exceptions.Ufunctypeerror: ufunc 'subtract' Did not contain a loop Signature matching types (dtype('<U21')
Basically I have the following code: import numpy as np def localize(aux1, aux2, aux3, aux4, aux5, aux6): search = np.array([(aux1,aux2,aux3,aux4,aux5,aux6)]) B1A =…
-
1
votes1
answer511
viewsI cannot increment a global variable in function parameter
What was asked of me: Declare a global variable called counter and assign it 0. Declare a Function called incrementCounterBy, which receives a Parameter called amount. It should increment counter by…
-
1
votes0
answers31
viewsProblem passing parameters to a Java controller
I am having a problem trying to pass parameters to any controller, using as example two of my controllers: The controller1 has the following function to navigate to controller2: public void…
-
0
votes3
answers468
viewsHow to pass arguments for running an android app?
I would like to know how to pass arguments for running an android app, or even create a configuration file to be consulted when launching the app.
-
0
votes1
answer275
viewsParameter-based query in SQL Server
I have a situation where I need to bring results depending on the parameter reported. If I gave you any number, which would be the code, it would only bring the result that has the code. If I didn’t…
-
0
votes2
answers289
viewsUse of callback parameter in JS functions
I’m trying to use a parameter callback (I don’t know if it’s the correct term here) inside my constructor, which calls a function I defined, but every time I try to execute the code it presents me…
-
0
votes2
answers514
viewsHow to pass the value of a variable through a button to another class in Swift
I have a login screen, with the e-mail and password fields. I need to use in another viewController the email that was used to log in to the system. But I cannot pass the e-mail typed in…
-
0
votes1
answer134
viewsC++ smart pointers and functions
I am reading an article on msdn about smart pointers. In the article there is this example: class LargeObject { public: void DoSomething(){} }; void ProcessLargeObject(const LargeObject& lo){}…
-
0
votes2
answers105
viewsParameters, functions in C
I am a beginner in programming and I have a lot of doubt about the functions and the parameters. Follow a code example: #include math.h int main(int argc, char *argv[]) // Dúvida nessa linha {…
-
0
votes1
answer742
viewshow to pass Url parameter via get
I am having a question regarding passing parameters from one page to another. I have tried it in several ways via get. I can even get the parameter, but not all the parameters I can get. In the…
-
0
votes1
answer654
viewsc++ - How to pass parameters between Windows in Qt?
Hi, I’m trying to pass a mat parameter from one window to another, being activated by the click of a button. The program compiles and runs normally, but when clicking the button that activates the…
-
0
votes0
answers200
viewsHow to pass a parameter to the controller that contains / (bar)
I need to pass a parameter to a Controller, however, this parameter contains / (bar). Example: 5701/1_1 5966/2_5 7881/6_1 To pass the parameter I’m using @Url.Action: @Html.ActionLink("Visualizar",…
-
0
votes0
answers36
viewsAccess and excel - load parameters
is it possible to use an excel table as parameters for access queries? I currently have 4 access files to carry out the same process, but with different filters (I used 4 files to leave organized).…
-
0
votes1
answer544
viewsError: assignment of Member '' in read-only Object
#include <stdio.h> #include <stdlib.h> typedef struct Ecoponto{ int codigo; int contentores[3]; char *cidade; char *rua; int nporta; }ecoponto; int insereEcoponto (const struct Ecoponto…
-
0
votes1
answer2260
viewsAndroid Open an app from another by link and with passing parameters
We are developing an App that will be a Store and will be responsible for the login and authentication of the user (a token will be generated every time the Store is opened and the user’s…
-
0
votes1
answer568
viewsI am unable to pass one vector per parameter in C
I am trying to pass a vector per parameter to a function in C, but I am going through difficulties. #include <stdio.h> #include <stdlib.h> #include <math.h> void calculafx( x2,…
-
0
votes2
answers119
viewsChained List C does not insert new node
I started making a chained list program, but when I use the print function, it wasn’t printing anything, so I discovered that the LISTA after leaving the function inserts, it again has the value…
-
0
votes1
answer70
viewsGood practice passing arguments to a method when they come from another function
I came across a code similar to the following: private fazerAlgo(AlgumaCoisa algumaCoisa) { Utilidades.converter( formatador.formatarParaTal( algumaCoisa.a, algumaCoisa.b, algumaCoisa.c ) ) } At…
-
0
votes1
answer114
views"min()" with two parameters
The person who worked before me at the company made that code: MIN(DATEPART('weekday',[Entrega Data Real]),6) What this 6 means? A min() can have two parameters?…
-
0
votes2
answers921
viewsHow to pass parameters in executed function via ng-click when it is in a list of buttons?
Using the IONIC framework I have the following situation, in an index.html there is a list of input items where the user will inform their respective username, e-mail and password and in a certain…
-
0
votes2
answers394
viewsSend URL parameter of a table to a modal
Good morning friends, I have a question to send URL parameters as if it were a; <a href=\"pagina.php?id=$id\" >enviar</a> Only instead of sending to another page, I would like to send to…
-
0
votes1
answer80
viewsHow to recover parameter from a Controller
After the user logs in, two parameters are passed to Controller Home: case SignInStatus.Success: { //recupera as informações do usuario que corresponda ao usuario e password var user = await…
c# asp.net-mvc-5 parameters asp.net-identityasked 7 years, 4 months ago Thomas Erich Pimentel 3,059 -
0
votes1
answer535
viewsCall Action as parameter in Html.Beginform - ASP . NET MVC 5
I have a code that queries a Webapi, writes to the database, and queries the database, in this application, a view that has 3 buttons, namely: Consult Ws Inserts BD Comic book consultation I am…
-
0
votes1
answer52
viewsHow to use ""Quickcontactbadge" by passing a number to the "assignContactFromPhone" method per parameter?
Guys, I was practicing a little bit here (I’m a beginner) and I came across the following problem: When I try to use a "Quickcontactbadge" passing a number per parameter to the…
-
0
votes1
answer143
viewsError: a property or an indexer that cannot be passed as an out or ref parameter
I’m having second thoughts about CS0206 Error Maybe a property or an indexer cannot be passed as an out or ref parameter on line 39 and 41 of my code, how do you solve this? 35| produtos[i] = new…
-
0
votes1
answer119
viewsChange string using function parameter
#include <stdio.h> #include <stdlib.h> #include <string.h> void menu_principal(char* monstro1, char* monstro2){ int escolha; char monstro[20]; printf("King of Tokyo\n\n");…
-
0
votes1
answer224
viewsDelphi Service Application: How to install the service by passing parameters that will be read via code when running?
I created a simple service application by Delphi. I need that at the time of installing the service in windows, I pass some parameters that will be read and used at the time the service starts:…
-
0
votes1
answer107
viewsWhy does the class accept parameter and the method does not?
I’m studying classes in Python and I don’t understand one thing: considering the last two command lines below, why the value 4 is accepted in the class Operators and not in the method metade()? Do…
-
0
votes1
answer110
viewsI need an explanation why the C code gives a Segmentation fault error
I started my dynamic allocation studies but I’m not able to make a simple example, I couldn’t find the problem. #include <stdio.h> #include <stdlib.h> #define SUCESSO 1 #define FALHA -1…
-
0
votes0
answers52
viewsWhat is the asterisk for as "parameter" in Python functions?
I was reading the documentation of version 3.8 of Python, in the part of the new syntax for positional parameters, and found the following function: def f(a, b, /, c, d, *, e, f): print(a, b, c, d,…
-
0
votes1
answer40
viewsWhy is a vector in C passed as a parameter by reference?
Why all other types of variables passed as a parameter to a function are passed by value and the vector does not?
-
0
votes2
answers104
viewsI want to understand how the instance variable and the local variable of the parameters works
public Exemplo { private int name; public Exemplo(int name) { this.name = name; } public void setName(int name) { this.name = name; } public int getName() { return name; } } I want to understand how…
-
0
votes2
answers263
viewsHow can I pass a parameter of any type to a generic vector? - C
I have a structure like TTabelaX, which is basically a table that I will store elements of any kind, ie I can create a table to store a type element TCarro, with plate and color, then I can use the…
-
0
votes1
answer60
viewsPass function by validation function in php
Good, I have a class "Entity", where I have the property "Phone", for the phone, I have a function the part that validates the phone number "isvalidTelephone", I also have a function that prints all…
-
0
votes0
answers52
viewsHow do I step by parameter in "literal template" the name of a specific property of an object in Javascript?
My question is this: I intend to eliminate a specific object through a property tech which I defined, which stores the technology as I add through an HTML form. I created an empty array const…