Posts by Gabriel Flor • 41 points
7 posts
-
0
votes2
answers47
viewsA: Pass a constructor variable to another method
Exactly as they said the solution is to put $this in the instance and assignment which becomes a global variable class Estoque{ public Function __Construct(){ $this->Conn= new…
-
0
votes2
answers47
viewsQ: Pass a constructor variable to another method
I am using PDO and I want a constructor method with the database connection but the connection variable is not accessible in another method class Stock{ public function __construct(){ $conn= new…
-
-1
votes1
answer55
viewsQ: Problem after increment
Post-increment problem returning 67 and returning 7: <?php $a = 10; $b = 6; echo ++$a; // pré incremento echo "<br>"; echo $b++; "<br>"; echo$b; // pós incremento echo"<br>";…
-
-1
votes1
answer39
viewsQ: You are running the direct commands with no time to type the other notes
You’re not letting me type the rest, just typing the first one goes to the last one. #include <iostream> #include<stdio.h> int main(void) { int n1,n2,pim,rn1,rn2,rpim,rfinal; rn1=n1*4;…
-
-1
votes2
answers562
viewsQ: How to use ("%10.2f",&d) in C I want the number to come out integer
#include <iostream> #include <stdio.h> int main() { int a,b,c,d; printf("Escolha Qual das equacoes se adequa a sua duvida de 1 a 3\n\n"); …
-
1
votes1
answer85
viewsQ: Doing BMI calculations I’m not getting just the result 80
#include <stdio.h> #include <math.h> int main() { float peso,altura,imc; imc=0; printf("digite seu peso ?"); scanf("%f",&peso); printf("digite sua altura? ");…
-
2
votes1
answer273
viewsQ: Using the switch function in C++
The function switch and I don’t know what I’m doing wrong marcos there appear "landmarks and cool" and put murilo "Nice and cool". I’m doing it like this: #include <stdio.h> #include…