Questions tagged as 'c++'

1
answer

Linked List - append and push

I'm trying to learn Linked List and made the following code: #include <iostream> using namespace std; typedef struct snode { int data; snode *next; } node; void start(node ** head) { (*head)->next = NULL; } void push(...
asked by 12.07.2017 / 02:43
1
answer

Difference between vector of pointers for a class and vector for a class?

When is pointer to class will we have to allocate memory space? What is the difference between the following two statements and when should they be used? Vector <class*> nameOfVector; Vector <class> nameOfVector;     
asked by 15.12.2016 / 14:32
1
answer

Library similar to Boost and STL in C

Is there a library similar to Boost and STL of C ++ with data structures, etc. in C?     
asked by 07.11.2016 / 03:15
1
answer

Printing a vector ... Differences between C ++ and C ... Where did I go wrong?

I have problems in vector printing of structs in C, in C ++ it worked ... First I will show the C version with problems (in the execution since it compiles without errors) CACHE cache = createCache(descricao); //chamada da main printaCache...
asked by 18.11.2016 / 05:08
1
answer

How to compile .cpp codes that have separate interfaces and implementations in g ++?

I am studying C ++ for the book of Deitel , and I am trying to compile a program where we have a file gradebook.h which is the interface, gradebook.cpp which is the implementation and test_gradebook_header_file.cpp which i...
asked by 13.09.2016 / 05:55
1
answer

Show a specific number of decimal places in floating-point numbers in the Lua language

I started learning a little about the language Lua and I'm doing some algorithms to practice and one of them should show in the output of the floating point values with 4 decimal places. In C ++ I would use cout << fixed << setpre...
asked by 08.08.2016 / 22:28
1
answer

How to store letters in a variable and display them all at the end forming a phrase / word

I'm holding programming and am making a code where I must turn a code into binary in a sentence. I'm turning the binary value into decimal, and getting the decimal value and comparing the ASCII table. But I do not know how to save the letters th...
asked by 25.08.2016 / 02:47
1
answer

Algorithm Shutting down PC screen after execution

I'm using windows.h in conjunction with C ++, in order to create a routine through the INPUT events. Such as setting the position of the mouse on the screen, clicking and things like that, but every time I perform either function, the screen the...
asked by 14.03.2016 / 02:26
2
answers

While code does not do the correct condition

I need to create a code that reads only a double and registers in two variables the "lowest so far" and the "largest so far", I can even successfully complete a cycle but after that it prints any value that I enter. I tried some ways t...
asked by 07.11.2015 / 19:00
1
answer

How to convert AnsiString to Char in C ++ Builder?

I need to choose a txt file through OpenDialog , to open through fopen . The problem I'm encountering and the conversion. The fopen function has as parameter const char , since opendialog returns the file p...
asked by 21.07.2016 / 21:13