Questions tagged as 'c++'

2
answers

Difference between std :: cout and cout?

EmCc ++ because some use std::cout and others use only cout is only what the programmer thinks is best?     
asked by 07.09.2016 / 22:54
2
answers

Show more precision in C ++

I have this program: int main(){ double x=2; cout << sqrt(x); } I would like to show the result as accurately as possible. Thanks!     
asked by 22.12.2015 / 20:21
2
answers

In C ++ what is the command corresponding to Java super ()?

In Java: public class Teste extends Testando { private String nome; private int numero; public Teste(String teste, String nome, int numero) { super(teste); this.nome = nome; this.numero = numero; } }...
asked by 26.03.2016 / 21:10
5
answers

Concatenation in C

I'm doing an algorithm in C to turn off some machines. This is my algorithm: #include <stdio.h> #include <stdlib.h> #include <conio.h> main() { char vetor[2][15] = {"192.168.2.200", "192.168.2.201"}; for(int i = 0;...
asked by 19.01.2018 / 12:41
2
answers

What is a tail recursion?

Nessa question I questioned about performance. One of the users responded that the compiler makes several interesting optimizations, such as inlining , loop unwinding, tail recursion, and caches. How does tail recursion optimization wo...
asked by 16.02.2017 / 11:36
2
answers

How to make Vector / Array of integers indexed by strings?

How do I make a vector / array of integers with strings as index? Something on the Moon would be: vetor = { ["eu"] = 10, ["voce"] = 11, } ps: It will be dynamic, so it will not have a fixed size. ps²: Struct or enum do not wo...
asked by 14.02.2015 / 09:28
2
answers

How to make a constructor like QObject?

Having a new question about an old question, I want to know how to create a class equal to QObject . Basically, I want to know: How to make a copy constructor that does not accept assignment operators? How to make a class that can de...
asked by 12.02.2014 / 18:16
2
answers

Function library find () does not return if found or not

I'm writing a program for a college exercise and I'm not sure about find() . I must enter two integers, check if the first number exists within the set already defined previously. If it exists, I should insert the second integer in...
asked by 14.10.2018 / 00:04
1
answer

How to print a hexadecimal value in uppercase?

I made a program in C ++ that reads a number and prints it in hexadecimal, follow the code below. #include <iostream> using namespace std; int main(void) { int n; cin>>n; cout<<hex<<n<<endl;...
asked by 30.07.2018 / 17:39
1
answer

How to perform operations with really large numbers in C / C ++?

How to perform sum operations with really large numbers? Numbers that can reach 50 or 1000 digits. Do I need to install any library? How to install this library on ubuntu? Can you post an example of the code by adding the two values below?...
asked by 02.04.2017 / 20:26