Posts by Marv • 173 points
8 posts
-
0
votes1
answer85
viewsQ: Definitions of unget() and putback()
I looked for some definitions and so far what I know is that the unget() must return the last character and the putback() can return other than the last. But my doubt would be on the functioning. I…
-
0
votes1
answer144
viewsQ: Doubt about the use of Static
Code: Header: class Cliente { public: Cliente(std::string nome_c, int num_cartao_l, int livros_c); Cliente(); void calc_Taxa(); const int get_livros() const { return livros; } const std::string…
-
2
votes1
answer420
viewsQ: Problem with operator overload
Errors occur when I step the class object Name_pairs by the exit operator << and by the comparative operator ==. Header: class Name_pairs { public: void read_names(); void read_ages(); void…
-
3
votes1
answer628
viewsQ: Code for earlier than expected
Follow the code with my suspicions: Header: class Name_pairs { public: void read_names(); void read_ages(); void print() const; void sort(); // Ordenar os nomes com as idades private:…
-
6
votes2
answers142
views -
0
votes1
answer59
viewsQ: Program having unexpected output
I’m having an unexpected output problem and can’t find the error in my code, the output in question is the errors of all sentences which are not "Dog walks." , a notorious observation is the fact…
-
3
votes1
answer833
viewsQ: Optimization game Bulls and Cows
I made this code from a game called Bulls and Cows (bulls and cows) where it’s a guessing game, but it’s a little different, I’ll give you an example: Hidden numbers are 1 2 3 4. If you put 1 2 6 7,…
-
2
votes2
answers126
viewsQ: while code does not make the correct condition
I need to create a code that reads only one double and register in two variables the "smallest so far" and the "biggest so far", I can even complete a cycle successfully but after that it prints out…