Beginners - April 2021

Ternary Tree construct
I have been suffering for three days trying to figure this out and start my code. Class Methods Description: An instance of the object TTree T is initially...
Apr 30, 2021 at 9:01pm
[1 reply] : Do the same as you would for a binary tree, but do the extra test for ... (by lastchance)
formula is not working
Just started coding and it seems like I must have typed the formula wrongly or something because the code keeps giving me answers that are very random numbers (...
Apr 30, 2021 at 7:43pm
[5 replies] Last: I've learnt that the order is very important and that I've to make sur... (by teacoder)
formula is not working 2
So I seem to have the same problem again with the formula and I have done what the other guy said just now on this forum and made sure that the formulas came af...
Apr 30, 2021 at 7:17pm
[3 replies] Last: So basically my problem was that I used a general formula for the code... (by teacoder)
array and vector - whitespace
Hello, I am doing problems on hackerrank, and had a question that involved putting values into an array or a vector. I have managed to get this to work but wond...
Apr 30, 2021 at 6:41pm
[5 replies] Last: To reverse access a vector's elements using iterators: [code firstline... (by deleted account xyzzy)
Press "esc" to stop asking for values
Hi i'm new here. I want to make a c++ program that will ask values that can be stored in an array and when the user press "esc" the program will stop asking ...
Apr 30, 2021 at 3:44pm
[7 replies] Last: For some reason I was thinking escape emitted 2 characters instead of ... (by jonnin)
Sorting a vector alphabetically
In the function add contacts, I want to add a persons name, phone, and email in my vector my contacts. I want to add their name to keep the contacts alphabetica...
Apr 30, 2021 at 2:48pm
[5 replies] Last: @dhayden, Out of this: string first = mycontacts .name; // save the... (by Handy Andy)
error E0029 Expected an expression
I keep getting an error message that's saying expected an expression, or error code E0029. I'm new at all this programming stuff, so any advice would be helpful...
Apr 30, 2021 at 11:11am
[8 replies] Last: Look at your function call: displaychart(visitors , Visitors) Wha... (by MikeyBoy)
I have a problem initializing an Array
I've declared an array in a class and Visual Studio displays an error saying "Too many initializer values". SIZE is a constant value that equals to 10, and th...
Apr 30, 2021 at 10:45am
[4 replies] Last: [quote=jonnin]as noted your bug is not having a type on it. That dep... (by keskiverto)
by dasdas
problem with rock paper scissors game
I am supposed to make a rock paper scissors game, but using function prototypes such as: 1.int random(); 2. string input(); 3. string compChoice(int); 4. ...
Apr 30, 2021 at 8:38am
[2 replies] Last: See this post http://www.cplusplus.com/forum/beginner/277786/ (by seeplus)
For loop does not modify values of vector
Hi! Hope you are having a great day. Is life not beautiful? Anyway... I came across this for loop that uses this value: private: vector<Flug*> Fluege; //...
Apr 30, 2021 at 5:08am
[4 replies] Last: Alright guys! It was my mistake here... The vector of "Fluege" (or "Fl... (by Mustermann)
Unknown Error
So im trying to write a program that reads the contents of two files into two separate vectors (GirlNames.txt and BoyNames.txt). Basically, I want the user to e...
Apr 30, 2021 at 4:32am
[5 replies] Last: Thank you, all for the help I will be trying every solution. I also ha... (by SweatyCoder)
by sarvcr
Help Autofilling a variable in C++
Hi! I'm learining c++, and for a project I need to work with binary numbers. I already have a function that translates from Decimal to binary, but I need to au...
Apr 29, 2021 at 4:45pm
[4 replies] Last: Setfill tool doesn't work as I need the integer to be 8 digits long t... (by helios)
by sam1x1
random function; first ouput way too high
i'm looping a random function to get random numbers from a die. the first number is always way too high. can someone please indicate where i'm going wrong. 64...
Apr 29, 2021 at 1:21pm
[3 replies] Last: Using modern C++ (C++11 or later) to generate random numbers: #includ... (by deleted account xyzzy)
Display the product of positive integers using functions.
Hi! I challenged myself to do another task but I was stuck again... I was tasked to find the product of positive integers using functions. The code will stop re...
Apr 29, 2021 at 1:02pm
[2 replies] Last: Wow! Thank you so much! It works perfectly! <3<3 (by gfriend owemji)
Final output is one lower than it should be.
Heya this is the issue that I am solving: Bianca is preparing special dishes for her daughter’s birthday. It takes her a minutes to prepare the first dish, ...
Apr 29, 2021 at 12:32pm
[5 replies] Last: but I don't really understand how it works just yet. Sum of an ari... (by lastchance)
Generate Multiple solutions for sudoku game
Hello! I need to program a recursive method to find all the possible solutions of a Sudoku puzzle of 16x16. the characters go from 0 to 9 and from a to f. So fa...
Apr 29, 2021 at 11:54am
[12 replies] Last: Hello! Thank you so much! The error I got was because I did not insert... (by panconcafe)
Problem of reading in a txt file
I'm working on a project and need to read in txt file having format as below: .row 12 .col 12 .blk 3 2 3 3 8 5 3 10 8 0 10 10 11 .net 2 Net1 3 9 11 11 Net2 6...
Apr 29, 2021 at 9:46am
[2 replies] Last: I don't know how you need the required read data, but as a starter per... (by seeplus)
by Sayo
How to Display Vector of Pointers to Abstract Objects
Hi guys, I'm creating an animal board game where various animals are placed on the board. I have an Animal class that is abstract. I then have a Rabbit and a ...
Apr 29, 2021 at 8:17am
[4 replies] Last: but whenever I attempt to display them all the values come up as 0 Ho... (by coder777)
Faster way?
Hello there For my course physical programming I need to simulate building-up of a neighbourhood. I need to simulate 100.000 houses in one minute. My code is...
Apr 29, 2021 at 7:08am
[4 replies] Last: Thanks for the replies! your tips made the code a little faster. I hav... (by MiquelH)
Not in FIle (1,2,3)
I am following along with a tutorial that is creating a bitmap file and writing fractal images to it. I am stuck on the part where I need to write to the file. ...
Apr 29, 2021 at 6:46am
[44 replies] Last: @max Best is to try it! Probably works OK Keep in mind the filename is... (by againtry)
April 2021 Pages: 123... 12
  Archived months: [mar2021] [may2021]

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