Beginners - October 2017 (Page 22)

Linked List ERROR Printing
 
Hello All, I'm having some problems printing a very simple linked list. The problem is with the end of the linked list, I'm getting EXC_BAD_ACCESS (code=EXC...
[3 replies] Last: if I use nullptr I would use it with n->data and not with n->next am ... (by Repeater)
if... else HW. Please help!!
 
Hello There!! I am having some trouble with 'if...else' statement. Supposed to show price for medium or large pizza with no coupon, medium or large pizza with c...
[6 replies] Last: Thanks for everyone's help!! I need more work on my variables... (by atomicholly)
by ventil
Stuck in a loop
 
I wanted to try making a pretty basic text game, to apply what I've learned so far. But I'm stuck here. In a while loop, when I use an if statement and insert c...
[5 replies] Last: Whoops my mistake then @Chervil . I must've been thinking about somet... (by Ganado)
Begginer struggle.
 
Hello,so i have 2 codes that need to output the same number but the second one is giving me problems,when x is 3 or more it works like the first one but when it...
[2 replies] Last: The clue is ... Z !!! Try the complex-number arithmetic (last two c... (by lastchance)
by Ch1156
How to enter info into a map
 
I'm trying to get familiar with maps, so im making a program that enters names and ages and puts them into a map but I dont know how to actually set them in the...
[5 replies] Last: #include <iostream> #include <map> #include <string> int main() { ... (by JLBorges)
Beginnning C++ class functions HW need help.
 
I am not asking for the answers I just really need help this teacher decided to tack this on on top of our huge project which I am already confused on. I don't ...
[8 replies] Last: #include <iostream> #include <string> // spec: write a function that... (by JLBorges)
Guidance on Tutor Program For Myself
 
Hello, For a while now, I have wanted to build a tutor program to tutor myself. I have a class right now, for each section we cover we are given definitions ...
[5 replies] Last: AbstractionAnon, Ganado, and Handy Andy, Thank you guys very much for... (by louiesluck)
by Ch1156
using pointers with vector iterators
 
I followed a tutorial online on how to use an iterator with a vector and it worked perfectly, but I wanted to try something myself, which is iterate through a p...
[3 replies] Last: > I BELIEVE that the Arrow operator can only be used with pointers p... (by JLBorges)
have code but trying to figure out what i did wrong
 
#include<iostream> #include <iomanip> #include<cmath> using namespace std; double calculatePresentValue(double futureValue, double interestRate, double nu...
[4 replies] Last: Its supposed to calculate present value with multiple functions. Altho... (by martyDegrasss)
Copy constructors with maps
 
Hi guys,sorry for asking so many questions,this thing is really confusing me class Person { public: string name; int age; Person() : ...
[2 replies] Last: http://www.cplusplus.com/reference/map/map/operator / is quite verbose... (by keskiverto)
Homework help?
 
Write a program that accepts 6 integers from the user, puts them into an array, and outputs the sum. This is the sample given by my professor. I have no ide...
[12 replies] Last: Andy answered pretty much what you needed, just need a "std::" added i... (by talemache)
by n2kin
employee exercise
 
Hello , I'm just starting to learn coding in c++ , I am trying to write a program that lets user enter some info and to be printed . Here is the code #incl...
[2 replies] Last: First, please use code tags when posting code. See http://www.cplusplu... (by keskiverto)
by Oizys
Problem with exercise
 
Idk what I'm doing and it keeps saying "'INCHES_PER_FOOT' is used uninitialized in this function 'CENTIMETERS_PER_INCH' is used uninitialized in this function. ...
[4 replies] Last: Thanks for all the responses, ty for helping me solve this issue Enoiz... (by Oizys)
Need help figuring out why my deposit/withdraw member functions won't work
 
I wrote a bank account program that uses classes and separate compilation. The heirarchy is as follows: Class Bank: Account account; Class Account: ...
[5 replies] Last: ignore openAccount and closeAccount for now, those are unrelated and h... (by jokersleuth)
shipping program
 
I'm writing a simple shipping program where a package weighing a certain amount and traveling per 500 miles = cost. For example, a package weighing 2kg travel...
[5 replies] Last: abstractionAnon, that is exactly what I needed. Thank you very much (by Ryoka117)
four names are being printed
 
hi guys when I try to print out each name,name : with a blank name gets printed,so 4 lines get printed instead of three, how can I avoid this? I tried add...
[5 replies] Last: thanks Anon that worked =) (by adam2016)
wrong output
 
hi guys I am writing a struct to a binary file and copying the data to a new struct anyway I am getting weird out put for some reason it prints 65adam instead o...
[3 replies] Last: Hello adam2016, It is always the simple things that get you. Glad it... (by Handy Andy)
The leftmost digit when there is no given number
 
I know how to give the leftmost digit when i am already given a number but when there has to be a random number entered into the cin space, i am not sure how to...
[1 reply] : int left_most_digit( unsigned long long number ) { if( number < 1... (by JLBorges)
How to add sum of digits without using loops?
 
Like for all numbers in general with two digits or more
[4 replies] Last: Depending on how you define "loop". To rephrase my initial answer, y... (by jonnin)
need help on my homework.
 
i need the message to show up only once for example i input 80 it only shows the 2nd message. #include <iostream> using namespace std; int main() { int a; ...
[4 replies] Last: One can use the opposite direction too: if ( a >= 90 ) cout << "A\n";... (by keskiverto)
October 2017 Pages: 1... 2021222324... 33
  Archived months: [sep2017] [nov2017]

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