Questions tagged as 'c++'

1
answer

Class C ++ Doubt

I would like to understand why some classes in C ++ have the following declaration: class Bla; class Ble { .... } My question is about the Bla class, it does not make sense as far as I can see.     
asked by 11.10.2016 / 18:35
3
answers

Can a global pointer point to a local variable?

In the case below, for example: int *pnum; void main(){ int num = 10; pnum = # } What would happen if I tried to access the pointed value of the pointer outside the main function?     
asked by 21.11.2015 / 01:52
1
answer

cin vs scanf, which one is faster?

In competitive programming, it is common for many programmers to use scanf() and printf() in C ++ code instead of using cin and cout . And I've even seen problems that result in a Time Limit Exceeded (TLE) when us...
asked by 01.05.2016 / 22:47
2
answers

How to use vector to store a class?

Example: class Nome {private: string nome; public: Nome(string nome); virtual void exibirNome() =0; }; class SobreNome: public Nome {private: string nome; public:...
asked by 27.03.2016 / 18:20
2
answers
2
answers

Function print with error

I made a program that calculates the Fibonacci numbers in X and Y using Z as a helper. When I pass the Fibonacci function vector to the imprime function, it does not print. I made a test by putting cout inside the for of...
asked by 02.05.2016 / 21:23
2
answers

Display 1 to 1000 in C ++ without using a semicolon

Make a program in C ++ that displays on the screen the numbers from 1 to 1000, relying on these two, but without using the semicolon . I have already made a sketch here but I have to choose between 1 or 1000. Complementing, my code: #in...
asked by 18.05.2014 / 19:57
1
answer

What is the difference between a DLL produced with C ++ and a C #

After some time searching, I did not find any results for this issue, the existing MSDN topics also did not return anything regarding the support of the 2 in Windows. In short, the question is, what's the difference after compiling a DLL prod...
asked by 17.11.2015 / 12:20
2
answers

Infinite loop trying to calculate whether the number is prime

I have no idea how I will determine the condition of for for prime numbers. I always end up in looping . #include <stdio.h> int main() { int num = 1, primo; do { printf("Informe um numero primo maior qu...
asked by 06.09.2015 / 06:07
1
answer

How to create a new library in C ++

I would like to know how to create a new library in C++ . if anyone can give an example, it can be a generalized example.     
asked by 30.05.2015 / 18:50