Beginners - July 2020 (Page 10)

How to write classes with generic functions that accept parameters of different types and inherit from a base abstract class?
 
In my project, I have a base abstract class with an interface, which derived classes implement. These derived classes have generic functions that accept paramet...
[3 replies] Last: Here's a C# version of the behavior I'm trying to achieve: using Sys... (by Kulagin)
by greta
libtorrent code problem with const
 
I'm having a problem compiling some libtorrent code. Here is the code. libtorrent::torrent_handle th = ...; // torrent_handle::torrent_file() is defined as:...
[1 reply] : it clearly states "If you want to rename the base name of the torrent... (by helios)
move and copy assignments
 
hello there! i'm currently learning move and copy assignments, and i would value your input and suggestions on taking what i currently have coded into a differ...
[5 replies] Last: that will simply reset the vector size :O? Yes, you need to copy/move... (by coder777)
Question
 
___________________________________________________________________________ Question: an hourglass made of numbers 1-9 only, 0 to exit. How to limit the numbe...
[12 replies] Last: Thank you~~ (by reneejong)
formulas
 
how would you translate this formula to work in c++ and can u explain why you did what you did because I am new to this. (p * (1 + r) n * r) / ((1 + r) n - 1...
[13 replies] Last: I was using the wrong conversions for my interest rate and pay period ... (by pnwadike99)
by momof4
Help exiting a game loop
 
I had a basic game loop provided for me for a project I had to do several months ago. I don't really understand what it is doing though, and why it works. Now I...
[7 replies] Last: Eh, just my opinion, but I think SFML has a pretty logical main event ... (by Ganado)
McLaurin Series Expansion
 
I'm trying to write a code that will calculate cosine using the Mclaurin series expansion : 1 - x^2/2! + x^4/4! - x^6/6! + ... - x^n/n! My biggest problem ri...
[2 replies] Last: Your factorial and sum functions has some issues. You make similar mis... (by Ganado)
Guessing game within 7 attempts
 
I am trying to write a program according to the following description: The user picks the number and tells the computer whether its guesses are too high or too...
[5 replies] Last: So it turns out the instructions were simply incomplete and the range ... (by linchukbb)
trouble calling delete on pointers in list
 
I have created a list class with nodes as an exercise, all 'seems' to be working ok but I can not find a way to free the memory with delete in my destructor...?...
[8 replies] Last: Thanks everyone all seems well! (by jamesfarrow)
Product of sum of all subarrays of an array
 
I've been able to find sum of all subarrays, product of all subarrays, product of the sum of all subarrays in O(n) but I'm not able to find a pattern for this. ...
[11 replies] Last: There are N(N+1)/2 subarrays so you have that many factors. Clearly mu... (by dhayden)
by Mif
Help with ListBox..
 
Why do I get this error? ||=== Build: Debug in ListBox (compiler: GNU GCC Compiler) ===| In function 'HWND__* InitListBox(HWND)':| |31|error: 'ARRAYSIZE' was n...
[2 replies] Last: ohh ok thank you.. (by Mif)
dynamic loading bar
 
Hey lads, I have to write a code in order to get a dynamic loading bar,( ex. windows is loading files). - https://www.partitionwizard.com/images/uploads/...
[9 replies] Last: thank you all for patience and explanation, truly appreciate it (by MaxGreen)
by alexas
simple intersection
 
I am not sure if it is really a programming question, but I am a little desperate so maybe someone will see some obvious mistake and help me. I am generating th...
[7 replies] Last: Yes, now I see some inherent limits when treating cuboids as spheres..... (by alexas)
Need insight with my inherited class
 
Hello! I'm having trouble getting my code to give me the correct answer when the 'Doctors' do not match. Thank you for any insight you can give me! #inclu...
[1 reply] : I'm having trouble getting my code to give me the correct answer when... (by coder777)
I need help with my intro to C++ assignment
 
For my assignment I have to write a program that creates a restaurant billing system. I think that I got it correct but it says that it is incorrect, so I was w...
[5 replies] Last: @OP as mentioned you also haven't made provision for entering the numb... (by againtry)
Create a MENU using Switch,If-else if, goto (1,2)
 
Hey lads, As you know I am only at the beginning so don't judge me too hard. I have to write a code using "switch", "if-else if" and "goto" which will be a Me...
[22 replies] Last: Here's a couple of points to consider: - line 3 and 9: where are thes... (by againtry)
string question, format
 
Hello I am following the plularsight c++ tutorials, and I am on the one about strings, but I have came across a part of code I do not understand, the person has...
[4 replies] Last: Thank you, the example helped me understand this. (by DonnaPin)
Division in C
 
Hello, If I use (5/9) or (9/5) instead of 0.55 and 1.8, I have different output. What's the problem? Thanks #include<stdio.h> void FtoC(double F)...
[2 replies] Last: You can try this: (float)5/(float)9 Or this: 5.0/9.0 ... (by Hezigon)
by Tima11
if statement doesn't work correctly
 
I'm new to C ++ and in my script to change the keyboard. For example: I press q and the program outputs a random letter. But when I press q for some reason, it ...
[10 replies] Last: Thank you at all! I will know. (by Tima11)
Maximum odd and even value & Minimum odd and even value
 
Hey guys, I have to write a code which will calc. which is the Maximum odd and even value & Minimum odd and even value. That's what i've done so far, pls...
[4 replies] Last: much better :) goto is better avoided when a loop will do -- it is al... (by jonnin)
July 2020 Pages: 1... 89101112
  Archived months: [jun2020] [aug2020]

This is an archived page. To post a new message, go to the current page.