Questions tagged as 'return'

1
answer

In java, a Void that makes a sum, returns value?

My question is what exactly is a return in java. For I think the sum answer would be a kind of return, is that correct? void soma (int a, int b) { int s = a + b; System.out.println (s); }     
asked by 04.10.2017 / 20:31
2
answers

Empty function return

Could anyone tell me why my insert2 function is returning null after insertion? it should be returning the string with the success message. <?php require_once 'conexao.php'; $con = new Conexao(); function insert($dados, $tabela, $campo_uni...
asked by 14.09.2017 / 19:11
2
answers

Shortcuts url C # [closed]

I'm setting a code in C # for a url shortener api to send in sms inside an application, everything is working, however the api outside of the code works, but inside the code oo return nothing comes back, I'm not much Experienced in C #, can anyo...
asked by 13.09.2016 / 21:12
2
answers

Ajax Date Return Behavior

My doubt is technical. I would like to understand better what happened. I spent a few days trying to solve a problem in my code. I found that the functions of ajax or php were wrong. Two PHP functions were very similar, b...
asked by 25.07.2014 / 22:28
1
answer

Return vector of integers in java

I'm trying to read a vector of integers and return the amount of ones and the number of zeros, but it always returns at least a zero, even though I did not enter that value. Debugging the code, even at the time of reading, if I enter 5 times the...
asked by 27.01.2015 / 02:58
1
answer

Return local variables of the function

I have two methods: // Apenas define um vetor de 4 posições e retorna ele int *verticesFromFace(int v1, int v2, int v3, int v4) { int vertices[4] = {v1, v2, v3, v4}; return &(vertices); } // pega um cubo e uma face dele, retorna um ve...
asked by 10.11.2016 / 17:39
2
answers

Return string in C for handling outside the function where it was declared

I should develop a calculator that reads strings from the algebraic form of the operation with complex numbers. I need to manipulate the "main" vector outside the function in which it was declared (receives). How to proceed? Should I use pointer...
asked by 26.09.2016 / 06:10
1
answer

Difference between List and and Return in Entity

Hello, I have a question when I get the data of a SQL query, there is the possibility of pulling by list and by Entity, what would be the "most correct" or usability of each? public List<Usuario> buscarTodos(Usuario mod){...} public Usua...
asked by 02.08.2016 / 20:58
1
answer

c ++ - How to return a value to a previous window in Qt?

Hello, I'm developing a project where I will have many calls to new windows and need to recover a value of these windows to the main window (MainWindow). The problem is that it becomes impossible to get the returned value because, when closing t...
asked by 29.08.2016 / 16:34
0
answers

My array is not returning, if you do not select a previous value

I'm doing a "mount your pc" and have some things that are optional and if you do not select a previous one, it does not bring me the value of subtracting. Example: Cabinet Motherboard video card SDD (optional) SO (optional) sour...
asked by 14.04.2018 / 03:22