Beginners - September 2018 (Page 12)

Issue with Relational Operators
 
I created a code that determines if a triangle can be formed when the user inputs three side lengths. This is based on the Triangle Inequality Theorem that sta...
[5 replies] Last: @rentandude, I know of no good "work-around", because that is the natu... (by lastchance)
XOR
 
find the number of pairs (i,j) such that 1≤i<j≤N and the bitwise XOR of Ai and Aj can be written as a sum of two (not necessarily different) prime numbers w...
[7 replies] Last: Its really shameful to ask on-going contest(Codechef September challen... (by pawan12)
cin boolean
 
Write your question here. i need to accept true or false as input and split accordingly. i think im missing a concept. Put the code you need help with ...
[2 replies] Last: ty (by witchee666)
most frequent and least frequent character from a input file
 
I need to write a program that reads a input file and displays the most frequent character and least frequent one. I have looked at examples from other people a...
[3 replies] Last: This is the code that's producing your output: cout << endl << "Lette... (by dhayden)
by josian
Bug in function using String and Find func
 
I found this fragment of C++ code in a website. Apparently there is a bug in this code. I test all conditions but they work as expected. Can anyone help me with...
[8 replies] Last: The original question was to find the bug in the code. I think the ans... (by dhayden)
Segmentation fault (core dumped) error
 
Hi. Im trying to write a code that will process grade data from a file. The program compiles but when i try to run it I get the error "segmentation fault (core...
[7 replies] Last: Hello ObiNation00, I found that your use of pointers to be the bigges... (by Handy Andy)
Find missing lines in file
 
Suppose we have given two files A and B and we have to find lines that are present in file A but not present in file B and print result to file C Loadi...
[14 replies] Last: You could read a batch at a time from the first file read into an unor... (by tpb)
OST to PST Conversion
 
For a safe conversion of OST to PST, the users can go with OST to PST Converter Software. With the help of this software, users can quickly recover and export O...
[no replies]
by DeBary
Percentages
 
How do I add tax in c++
[2 replies] Last: double price, tax, endPrice; //get input from user std::cout << "\n... (by H00G0)
BlackJack problem
 
Hiya I am just trying to learn C++ on my own - I am 56 yrs old and did it yrs ago so now that I am retired I have time to work on this again. My problem is in ...
[2 replies] Last: Hey, thanks a bunch for all of that - - it worked and I am going to do... (by rhamm5798)
passing reference of 2d vector of characters
 
Hi everyone, So far, I have only used a 2d array for a matrix. I was given the declaration of the vector as, vector<vector<char> > A (N,(vector<char> (N)...
[5 replies] Last: this might be a good place to typedef or similar the annoying double ... (by Thomas1965)
Singly linked list various questions
 
#include<stdio.h> #include<stdlib.h> #include<conio.h> struct node { int key; struct node *next; }; typedef struct node node; void ...
[6 replies] Last: In C you should not cast the return type from malloc. https://bytes.co... (by Thomas1965)
what is function call overhead?
 
I was reading about inline function and I came to know that one of the advantage of inline function is that function call overhead doesn't occur, my question is...
[1 reply] : Hi, Do you have Google & Wiki ? The first few hits are informative. (by TheIdeasMan)
by HarGar
Issue displaying Gross Pay as $0.00
 
Design a Payroll class that has data members for an employee's hourly pay rate and the number of hours worked. Write a program using an array of seven Pa...
[1 reply] : You are reading and updating local variables in main, lines 20-26, you... (by closed account E0p9LyTq)
class get and set
 
im having trouble with double land::getwidth() { width=wid} the full description of this question is Skill set: Creating a simple class Step 1: Follow along ...
[1 reply] : double land::getwidth() { return width; } (by Repeater)
How do i get my output to look like the expect output sample
 
Write your question here. My concern is the do-while loop. My output is: Enter the old and new consumer price indices Inflation rate is -0.0390204 Enter t...
[1 reply] : rearrange your while loop. (by SamuelAdams)
by colt
Error with constructor's prototype not found with dyn mem allocation
 
Hello I recently was trying to copy the content of a vector of the kind "Triangle" to a dynamically allocated array of the same kind. For such, first I creat...
[2 replies] Last: Add Triangle(); inside the existing declaration class Triangle() { .... (by colt)
How do I add a loop to this code
 
How can I ... 1. Put the logic in TODO #2-4 into a loop (do-while preferably if possible) that asks the user to enter 'y' (or 'Y') if there's more data to be ...
[12 replies] Last: Ok... it runs but it is not giving the output correctly. Example of ... (by ryan157)
How do I generate random numbers on the heap?
 
I have no idea how to add "new" to dynamically allocate each point. I want to randomly generate 10 points between -10 and 10 on the heap. The code works, but th...
[10 replies] Last: Thanks for the replies. This is an update. The assignment says I can u... (by boypetey17)
C++ caching
 
Hi, I need to store data of a 1MB file in cache, so when I close the application, and open it again, I can find the data. Thank you.
[8 replies] Last: Ganado, a ram disk is a driver program that turns a block of ram into ... (by jonnin)
September 2018 Pages: 1... 1011121314... 20
  Archived months: [aug2018] [oct2018]

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