Questions tagged as 'c++'

2
answers

What is the C ++ copy constructor for? How should I implement it?

I am programmer Java and I am currently studying C++ . In addition to the "normal" constructors (the default constructor and the parameterized constructor), C++ has a copy constructor. I would like to know what it is for and...
asked by 27.03.2014 / 18:01
2
answers

Capture Computer Name and User Name

I'm developing an application and in one of its methods I need to capture the name of the computer and the user logged in to the machine, then display the screen for the user. What is the best way to do this?     
asked by 13.01.2015 / 04:20
3
answers

When to use size_t?

Now research the subject, but I always get confused. I found a article in English that explains very well some reasons for the existence of the type and how to use it. In this article the type is meant to represent sizes in bytes of objects, h...
asked by 20.04.2015 / 22:54
2
answers

What is the difference between static and dynamic linking?

Recently, researching why small codes in Go have a much larger executable than the same C-generated code, I've read one response stating that the reason is for Go to use linking static , unlike C, which uses linking dynamic . What exact...
asked by 26.08.2016 / 22:25
1
answer

What's the difference between #include filename and #include "filename"?

Why we use #include <filename> and #include "filename" When to use each?     
asked by 04.01.2017 / 13:36
1
answer

Why do we use parentheses in a pointer declaration?

What's the difference between these two statements? int* array1[10]; int (*array2)[10]; Why are there parentheses in the second?     
asked by 10.01.2017 / 11:36
1
answer

Why are there two const variables in the variable declaration?

I can do this: const int* const objeto = &x; Why are there two const ? What is the function of each one?     
asked by 15.03.2017 / 12:25
4
answers

How to split a string in C ++?

I received this simple (I really thought it was!) challenge of creating a "tokenizer". I had to split string " O rato roeu a roupa do rei de roma " into spaces. So, after a long time, I developed the following algori...
asked by 03.03.2014 / 20:31
1
answer

Difference between std :: list, std :: vector and std :: array

All containers used to guard data sequentially, but what are the main differences between them?     
asked by 04.11.2016 / 17:30
2
answers

Is it possible to create an application in C / C ++ for Android?

I want to create an Android application using C or C ++ language. What are the advantages and disadvantages of this?     
asked by 01.06.2017 / 19:59