General C++ Programming - August 2018 (Page 6)

Help with Updated Program
 
Hello, So below is a code I have written; however, it has some specifications that are not being met and I am unsure what I am supposed to change. 1. Both...
[2 replies] Last: So basically what I am missing is: void readingscores(int scores ,... (by katalinaisland)
by Yaxit
Container of Inherited Class Instances
 
Hello everyone, I've been working a couple of days on this school project, here the issue I stepped into: I have 3 classes that inherit some traits from an User...
[5 replies] Last: I did manage. Thank You! (by Yaxit)
Problem with key registering
 
Hi guys i have problem with key registering.So i have a program that registering every key press from a-z and 0-9 so i make them but when i press and hold key t...
[2 replies] Last: pseudocode: once static char last = get key press from hardware log(l... (by jonnin)
Where are delegating constructors useful ?
 
Hi ppl, I just came across this concept of 'delegating constructors' introduced from c++ 11. I was wondering in which scenarios these are useful. I und...
[3 replies] Last: Thanks :). Pretty clear now. (by kapil2905)
Missing code
 
Hey so I'm having trouble placing the missing code in order to get this program to work here it is, with the missing lines at the end. #include <iostream> #...
[2 replies] Last: you have three functions digit_name() teen_name() and tens_name(). lo... (by Jaybob66)
functions pointers for main loop, does anyone do that?
 
Hi, i have a program's main loop performing different actions depending on it's "mode" (let's pretend the mode is just an integer from an enum). These actions...
[4 replies] Last: Something like this, perhaps: struct mode { virtual mode* action... (by JLBorges)
Explanation of a quote
 
I've been reading the book "C++ Primer, Fifth Edition" and I stumbled upon something I seem to be unable to grasp: A decimal literal has the smallest type of ...
[6 replies] Last: rax overlaps with a single 32-bit register, a single 16-bit register, ... (by helios)
by kgerm1
i need help, please!!!
 
I need help with writing a while loop statement in c++ that works. this is the endstate. Total is 0 Please enter an integer: 5 Total is 5 Please enter an...
[2 replies] Last: You have initialized the variable total to 0, and your program should ... (by fewdiefie)
Ladder Problem using Dynamic Programming (Bottom-up Approach) in O(n)
 
In the given problem we have to find the no. of ways in which we can reach the top of ladder from the bottom, where n = total number of steps in ladder. k = ma...
[3 replies] Last: This is the partial solution for steps 0 through k-1. This might now ... (by dhayden)
Modular GCD problem of codechef
 
Given integers A, B and N, you should calculate the GCD of A^N+B^N and |A−B|. (Assume that GCD(0,a)=a for any positive integer a). Since this number could be ...
[1 reply] : Google the properties of modulo arithmetic and see if you can figure o... (by dhayden)
Dot Operator Error
 
Hello, I am trying to do a code with a header file, main, and client file. I keep getting recurring errors for a dot operator. How would I fix this issu...
[4 replies] Last: Every line with the fraction::fraction I get the error " Cannot use d... (by Repeater)
Question regarding Simpson's rule
 
Hello guys, I am working on a Simpson's rule problem. I am said to integrate from a=0 to b=1 at n=7 steps and should get an integral equal to 0.333. Also need ...
[3 replies] Last: Thanks. I understood my mistake :) (by aurimas13)
write a program to Finding words that begin with specific letter "s" in text file.
 
Hi Experts, Question about File handling in C++ .... write a program to Finding all words that begin with specific letter "s" in text file?
[13 replies] Last: Thank you so much "Ganado" sir..... (by kuldeep s)
Text File Output Issue
 
I have a code and when I want to run it with the .txt file it wont give me the right output. How do i make the code read the output file of score.txt My code is...
[1 reply] : Your code works for me. (by Thomas1965)
Issues With Translating To C++
 
Hi there, I'm currently writing code for a simple game for a project and have stumbled across some issues. The game has an avatar, holding an object, moving a...
[10 replies] Last: Try this: #define ESC 27 #define SPACE 32 int main() { int g... (by Thomas1965)
by HarGar
Kohl's Giftcard Program
 
Write your question here. The store Kohls is offering giftcards accourding to the following purchase amount: amt purchased card amount less tha...
[2 replies] Last: Totally thought this was spam. (by Ganado)
by tpb
Competitive Programming
 
What about this input: 1 bbb ooo BTW, you should re-copy/paste your code in code tags: your code goes here
[2 replies] Last: it would give yes as output (by hst005)
system command for wc
 
Write a C++ program called wcount.cpp that uses the system command wc to count the number of lines, words and bytes in a given text le. Your C++ program shoul...
[19 replies] Last: Ok cool. That makes sense, I'll carry on with it and see what I come u... (by parallx)
graph
 
I want to find input-output paths for directed acyclic graph.I want to find if given graph (calling object) is a DAG, the vector rpt is populated such that: rp...
[no replies]
displaying certain data from the text file
 
#include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; void input(); void displayall(); void update(); void ...
[5 replies] Last: yeah I just started learning about the language for like a month since... (by rarian10)
August 2018 Pages: 1... 4567
  Archived months: [jul2018] [sep2018]

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