Questions tagged as 'tipagem'

2
answers

Field of the type time or decimal, how to solve?

I have in the system that I am developing a field called flow, which can be filled either with a decimal value of type 0.5 and 2.4 or with a time value, type 15 min and 5 h. What is the best solution when creating this field in my table? Leave...
asked by 28.04.2016 / 16:28
1
answer

Problems with union of 2 vectors

I have a problem to join two sets of integers into a vector, without repeating numbers that are in Set A and Set B. The following error is displayed in line 13:    error: unknown type name 'bool'; did you mean '_Bool'? | Changing bool...
asked by 16.11.2018 / 07:19
2
answers

Unexpected result

I want to divide two integers and result in a floating point value. The following code works normally: #include <stdio.h> float divInts(int x, int y) { return((float)x/y); } void main() { printf("%f",divInts(50,3)); } But...
asked by 07.09.2018 / 21:10
1
answer

Binary file being written incorrectly

Creating the binary file: #include <stdio.h> int main(int argc, char const *argv[]) { FILE *BIN; BIN = fopen ("BIN.bin","wb"); if (BIN!=NULL) { for (int i = 1; i <= 100; i++) { fwrite( & i,sizeof(i),1,BIN);...
asked by 21.11.2018 / 13:39
1
answer

How to represent the real type in C #?

I have an existing table in a database of my client and there has an attribute with data type REAL . How do I represent in C #? float or decimal ? What is the best way?     
asked by 20.08.2017 / 21:00
1
answer

Bitwise operation

In my first semester of college I made an algorithm to avoid wasting memory, just for testing. Now I'm passing this code to C: Here is the whole code: // 8 bits // Aguenta até 4 slots (0 - 3) // Valor inteiro máximo suportado: 255 void...
asked by 16.03.2017 / 17:49
1
answer

Creating byte collection in old browsers via JavaScript?

I was wondering if there is something like Uint8Array in old browsers (to a minimum in IE8), a collection type with elements that occupy only 1 byte of browser memory. An approximation would be to use strings , but as far as I know,...
asked by 31.12.2016 / 17:55
1
answer

Lua language typing strength

Moon has dynamic typing, but after all, is it strongly typed or weakly typed? Each source I consult has a different information, which left me in doubt.     
asked by 25.04.2018 / 04:34
1
answer

What does the class name in super () .__ init __ () mean?

What is the function of the name of the classes inserted inside the parentheses of the constructor __init__( ) , in classes Telefones , TiposTelefone and Agenda ?    This is just a code snippet from Chapter 10 of "Int...
asked by 26.07.2018 / 21:59
2
answers

while not running from the beginning

#include <stdio.h> #include <stdlib.h> main(){ int parar=1; // Condição para parar. int a=0, b=0, c=0; //Elevadores int count=0; //Numero de pessoas char elevador=""; //Elevador do{ printf("Elevador: "); scanf("%c", &e...
asked by 13.06.2017 / 05:21