Beginners - October 2016 (Page 27)

Stuck with this problem
 
You have to write an ITERATIVE procedure write_digit(d,x) that receives a digit d and a natural number x, and writes x times the digit d in the standard output ...
[no replies]
by CTLZ
Help with getter Function
 
My get function is returning 0 instead of what i set through user prompt. Is it my set function i coded is in the wrong format? #include <iostream> #incl...
[8 replies] Last: i moved it into my storage method and use the variables to contain the... (by CTLZ)
My program does not work (subprograms and leading zeroes)
 
You have to write an ITERATIVE procedure write_digit(d,x) that receives a digit d and a natural number x, and writes x times the digit d in the standard output ...
[2 replies] Last: Hello Oriol Serrabassa, Try putting the if else in write_digit inside... (by Handy Andy)
Memory allocation
 
As part of learning to use the Standard Template list, I wrote a simple program. The idea behind the program is to take 'n' number of words and then arrange...
[6 replies] Last: Yes. I realize i have a long way to go. Yes. my program is complex. I ... (by avillageofbigheads)
Get filename from input
 
I want to input a filename from input, then open a file with that name. If doesn't exist, create one. I tried this but wouldn't work. Any idea? char file...
[3 replies] Last: Silly me, simply strcat() had solved my problem. Thanks anyway! (by tomtran3110)
idiomatic for loops for idiots
 
This may or may not be idiomatic seeming but I am confused right now with how this works. Please explain as best you can. I did not make this code I just found ...
[4 replies] Last: After the first loop of original code you have all freq array equal ze... (by vin)
Please help with displaying a monthly loan schedule.
 
I've written this program to calculate monthly payments based on the inputs below. The equation I've been given to determine monthly payments is: monPayment = ...
[3 replies] Last: It's a homework assignment , he specified all of my other variables bu... (by Viking86)
by fsfh60
Functions Help
 
Hello friends, I am new to C++ I am learning C++ and I came accross this example that I needed some clarification. Every time user inser less than 69 it outp...
[3 replies] Last: You need to use and instead of or . (by Thomas1965)
boolean and loop statements
 
Hi Need help please! I am stuck :( I am trying to write a program where functions are involved to validation user input and prints final sales total. A begi...
[2 replies] Last: THANK YOU VERY MUCH!! Appreciate your help (by Tavalya)
Losing data while using functions
 
This program takes in 4 ints and calculates sum, average, and product using functions. My issues is that the average function does not return a double but an in...
[1 reply] : double Calc_Ave(int sum, int num_items) // invariant: num_items > 0 ... (by JLBorges)
how can i get address of char b?
 
#include<iostream> #include<string> using namespace std; int main(){ int a = 10 ; cout<<"a is : "<< a <<endl<<"&a is : "<<&a; char b =...
[4 replies] Last: > Just a little bit correction: convert the pointer to char to pointer... (by JLBorges)
MergeSort on Doubly Linked List
 
I'm trying to implement mergesort on doubly linked list that guarantees the worst case of O(n log n) without destroying any node. The head pointer is updated wh...
[no replies]
Just a simple question.
 
Hello! I'd like to ask you guys what's the difference between these two notations(Shown below). Sorry for the dumb question, I'm kinda new in C++. ...
[3 replies] Last: http://en.cppreference.com/w/cpp/language/list_initialization The lon... (by Yawzheek)
Pairing User Input to 2-D Array
 
I'm having trouble finding information on this specific issue. I have a function that takes an input of User name and another function that takes the length of ...
[no replies]
Help with reading form a file
 
Hi, I'm trying to build a kind of "database" of grocery products. The idea is have a txt file with the information of the products, name, price, and maybe more ...
[2 replies] Last: Ok, thank you very much for the aid! (by incandenza)
Help fixing a couple errors
 
This is a module (.dll) for an old game called Diablo II. It is compiling with Visual C++ 6.0, but I get the following errors while compiling: I was trying t...
[2 replies] Last: Thank you @Moschops. This worked fine. (by Edelweise)
c++ future
 
hello everyone ; I am just curious about c++ what this language can do ?what is my future with it? I heard that this language can make my computer do anythin...
[4 replies] Last: thank you very mush for the Response (by EgyptianCoder)
For loop help!!
 
I need help with my for loop. I want the user to enter a number between 1 and 5. If they enter 2 then the for loop should print out "What category for the ...
[4 replies] Last: Wait never mind, I think I know what you're saying. (by fivestar)
Problem with console game loop not ending
 
Hi, in my main function, my while loop doesn't end and return to 0 for some reason. I use a function in a class that returns a pointer for HP and I use it for t...
[3 replies] Last: @WheatFieldOnFire I used to do that too but then I saw someone's code ... (by lilbigwill99)
Palindrone
 
I wrote this code out but it does not seem to compile. it is a palindrome for checking the same string front and back. #include <iostream> #include <strin...
[4 replies] Last: Alright. It makes sense. I have a string (a for apple 'n' b for ball)... (by rockey13)
October 2016 Pages: 1... 2526272829... 51
  Archived months: [sep2016] [nov2016]

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