Questions tagged as 'c++'

4
answers

Rand between numbers with comma

How to generate a number float between two numbers? Eg: A random number between -270.33 and -47.5.     
asked by 13.05.2016 / 23:49
2
answers

How to make a struct in C #?

How to make a structure in C # where you create a type? For example, in C ++ we use: struct teste { int a; char c[30]; };     
asked by 03.01.2016 / 02:41
2
answers

How to do that after reading a file "txt" it read another then

How to do after reading the file txt check if it has a next file txt , I know that to read the file it suffices: ifstream Arquivo; Arquivo.open("teste.txt"); while () { // leitura } After reading this file, check if you have...
asked by 21.05.2015 / 21:09
2
answers

How to omit parameters in the actual parameter pass?

I have a C ++ function called minhaFuncao() declared like this: minhaFuncao(int x, int y, float a); and implemented like this: minhaFuncao(int x, int y, float a=0){ ... } What I'm trying to say is, when I call minhaFuncao...
asked by 28.06.2017 / 20:25
1
answer

Difference between "iostream" or "stdlib.h stdio.h" in #include

I'm learning to program in c ++, and I'd like to know the difference between programming with the library #include <iostream> or the libraries #include <stdlib.h> #include <stdio.h> One would use things like std::c...
asked by 05.04.2018 / 06:29
1
answer

When I create a function in C ++ do the variables inside it stay in memory?

When I studied pseudocode, I learned that when you call a function and create a variable, it only "exists" when I call that function, for example. funcao teste(): x = 10 retorna x In case, when I called my test function, it woul...
asked by 12.03.2018 / 00:11
2
answers

IF always gives me the same answer!

#include <iostream> using namespace std; int main(){ int x, bebida; cout<<"Digite 'bebida' "<<endl; cin>>x; if(x == bebida){ cout<<"Esta certo"<<endl; } else{ (x !=...
asked by 26.09.2017 / 20:53
2
answers

Chance of possibility in c, c ++ or matlab

I need a program that gives me the possibilities of the following equation: x*y = 1700/57 Since x and y are real positives resulting from two integers ("a" and "b") different from 1 to 300 . I tried but...
asked by 04.10.2017 / 02:56
2
answers

Is it necessary to invoke the "ShowWindow" and "UpdateWindow" functions?

Recently I did an introduction to the Windows API and I'm already in the part of creating windows. In one of the first applications I created I had use of ShowWindow and UpdateWindow after creating a window, but even without them t...
asked by 27.06.2015 / 00:10
2
answers

How to receive a keyboard pointer in C / C ++?

How do I get a pointer to char via keyboard?     
asked by 17.10.2014 / 18:32