I make the sum of two numbers 5 and 5, how to pass the result (10) as follows : vetor[0]=1 and vetor[1]=0 , ie separate result for each position of my vector, without the vetor[0] receiving the full value that would be ve...
My program was showing strange behavior, until I discovered that there was an overflow of array , for example:
int arr[3];
for (int i = 0; i<10; i++) {
arr[i]=i;
cout << arr[i];
}
In this light example, i exceeds th...
I want to read rows from a SQL and use them to create objects and finally put these objects in an array. But in the end my methods (of the class Object) do not print the name of the object.
The code to read only one line works, so the problem i...
I have the following code:
#include <stdio.h>
#include<stdlib.h>
#include<string.h>
int main() {
char v[]= {'Brasil', 'Alemanha', Japão'};
int i = 0;
for (i=0; i<4; i++){
printf("%s", v[i]);
}
}
Ho...
In a given process in my system, I get a array of characteristics as a return from a function, and this array can contain several information, including other arrays with different names for each type of information....
Converts numbers from 1 ao 26 to A - Z of the Alphabet. I have a directory with several files and I wanted to make a "FOR" for, ... the name (file). I'm doing this with files named by ordinal numbers, but I'd like to do this with f...
I'm creating a program that stores a person's tasks in an array, and shows them those tasks.
But I have trouble showing tasks. I can not show the old jobs. Only the last task entered is displayed.
Code:
<?php session_start(); ?>
<h...
I'm trying to print a split , but after passing for , the first value returns as undefined , could you tell me what it could be?
function parteTexto() {
var teste;
var texto = document.getElementById("caixa").value;...
I'm trying to display the values of a JSON with PHP most unsuccessfully.
Used Code:
JSON
{
"friendslist": {
"friends": [
{
"steamid": "76561197960265731",
"relationship": "friend",...
I have the variable $search_dorms that returns me Array ( [0] => 1 [1] => 2 ) .
It can also return Array ( [0] => 1 [1] => 2 [2] => 3 )
Or simply Array ( [0] => 1 )
I'm trying to check the re...