[try Beta version]
Not logged in

Beginners - April 2019 (Page 15)

by sturk
C++ Polymorphism
Why is the output 'B' instead of 'BD'. Do not get it.. Given the following code: class B { p...
Apr 13, 2019 at 5:15pm
[2 replies] Last: pB points to an object of type B so that is why pB->foo() will call B:... (by Peter87)
by arg57
Why use std::
Why do some people use std:: when you can use "using namespace std " ? ng Put the code you n...
Apr 13, 2019 at 4:33pm
[2 replies] Last: the 10 cent summary of the article is that std:: is huge beyond contro... (by jonnin)
Making the player go back to the same question
Hello, im trying to learn how to programm and im trying to make a little test now as my first projec...
Apr 13, 2019 at 4:26pm
[1 reply] : #include <iostream> int main() { const int correct_answer = 4 ; ... (by JLBorges)
Storing vectors in vectors?
So I'm new to coding and I'm having difficulty with this homework. Basically the hw is an athletic d...
Apr 13, 2019 at 4:22pm
[5 replies] Last: it does not work that way. push_back puts an entire item of the <type... (by jonnin)
allow the user to skip entering one of the values
can someone give me an example of a code that will still run if the user don't input a data? like fo...
Apr 13, 2019 at 4:16pm
[2 replies] Last: #include <iostream> int main() { int first = 10 ; // 10 is the d... (by JLBorges)
by kenken
Primality test
This function seems to work for small number but fails with large number. Can anyone help me underst...
Apr 13, 2019 at 11:08am
[6 replies] Last: Its part of the language and has been for some time (c-99 era? not sur... (by jonnin)
Python to CPP
I have a code snippet of tree in python but I can't change it to C++ so I need help here def ...
Apr 13, 2019 at 9:28am
[7 replies] Last: thanks i got it! but the max_profit() function which @helios converte... (by closed account STD8C542)
Need an approach
You are given a rooted tree with N nodes (numbered 1 through N); node 1 is the root. For each valid ...
Apr 13, 2019 at 8:12am
[8 replies] Last: It seem to question from an on going contest https://www.codechef.com/... (by gokuluffy)
by m2020
operator precedence and pointer to an array
Hello everyone I have very basic questions 1- why the output of following code is 4? (in many ...
Apr 13, 2019 at 7:23am
[5 replies] Last: Thank you dear duthomhas. (by m2020)
Return type of std::map::insert
At the time I try to understand the behavior of the std::map facilities. Especially I want to know o...
Apr 13, 2019 at 7:06am
[3 replies] Last: If you don't care if the key already exist or just want to overwrite o... (by Peter87)
by sturk
C++ multiple inheritances
Why is the answer 1 and not 2 to the following codes below? Revising for a test. Thanks! Given...
Apr 13, 2019 at 7:02am
[1 reply] : ab.A::print(3.14f); This line specifically states that the print ... (by Repeater)
Search stopping when data not found
Apr 13, 2019 at 6:14am
[1 reply] : http://sscce.org/ Post something we can try showing your attempt to us... (by salem c)
struct in c program
Bellow code is c programing. struct NodeStruct { int Base; int Value; void (*pinMo...
Apr 13, 2019 at 4:15am
[2 replies] Last: Thanks Duthomhas (by kakaducsy)
Reading input from file into vector
Hello, I was reading in Bjarne Stroustrup's "Principle and Practice Using C++" when I encountered t...
Apr 12, 2019 at 10:26pm
[5 replies] Last: Zeta z; … anytype z; // redefinition of z vs for (…) { ... (by Duthomhas)
Getline Repeats cout command twice, Help please!
I'm trying to make a program that's just an general assistant. It works great. Just one glitch. When...
Apr 12, 2019 at 8:28pm
[2 replies] Last: Hello navilgameboy, PLEASE ALWAYS USE CODE TAGS (the <> formatting ... (by Handy Andy)
Inventory/List
I am wondering what would be the best way to create an inventory class or list, to store and possibl...
Apr 12, 2019 at 8:03pm
[1 reply] : I would be inclined to use either a std::set or a std::map. Use a std... (by Duthomhas)
Getline Repeats cout command twice, Help please!
I'm trying to make a program that's just an general assistant. It works great. Just one glitch. When...
Apr 12, 2019 at 7:59pm
[4 replies] Last: Yay. (by Duthomhas)
interactive program, sumone plz solve it
Write an interactive program that asks the user for the population of a country,and replies with how...
Apr 12, 2019 at 7:41pm
[4 replies] Last: Try solving this in 3 steps. First write a program that prompts for t... (by dhayden)
"Segmentation fault (core dumped)" While Using Recursion
Please Note: This is a homework assignment, however , the due date has already passed and I'm jus...
Apr 12, 2019 at 6:35pm
[6 replies] Last: [quote=jonnin] Nevermind :) I havent worked in octal in a while, and m... (by PiggiesGoSqueal)
by AlanW1
Homework Help Please - C++
In the new intellectual TV show, the participant passing to the super final is offered the following...
Apr 12, 2019 at 2:08pm
[8 replies] Last: dhayden, I will try to do it yourself according to your recommendation... (by AlanW1)
April 2019 Pages: 1... 1314151617... 24
  Archived months: [mar2019] [may2019]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.