Beginners - October 2016 (Page 30)

Issues with Vectors
 
I'm trying to allow someone to input variables into a shopping list so you can then output them after you are done inputting by inputting * The program is givin...
[1 reply] : shoppinglist.push_back("a"); cout << "Enter your shopping list. Enter... (by SakurasouBusters)
What is wrong with my loop?
 
I'm trying to get it where a user can keep entering the weights/distance of shipment of an item until the user enters zero. The loop will then add up the sum to...
[12 replies] Last: Hello boordman29, Your code is 90+% there. This is what I did to make... (by Handy Andy)
Simple Blackjack Program Error
 
I have to write a program for my programming class. The assignment is thus: Create a program that allows the user to type in cards in a dealer's hand, one at a...
[2 replies] Last: THANK YOU. Nobody in my dorm could figure that out, thank you so much. (by Demonstruck)
Creating a string program that counts the number of letters in total.
 
Hello, I have been trying for a few hours to create a program that counts the number of letters in the ten words that are provided, not including spaces. I am c...
[1 reply] : The i you create on line 20 is not the i you created on line 14.... (by cire)
why return function " *hey " has a strange behavior
 
why return function " *hey " has a strange behavior ? #include<iostream> using namespace std; char hy(char *a) { return *a; } //char *a = &r --->retu...
[5 replies] Last: Yeah i should've given a more complete example. To actually see the ad... (by Ganado)
How to show contents of pointer when in an array
 
I have an array of pointers to objects (same type). But whenever i print the pointer is shows only the address. How do I make it show the contents? **Only p...
[7 replies] Last: Thank you for explaining it to me! i found examples online but was hav... (by kingkush)
Undefined Reference " " Error
 
So I am writing code for an elevator program. Using templated Stack and Queue classes. I have an exectuive class and implementation file that uses the methods f...
[6 replies] Last: Awesome! Taking out the .cpp files and moving the definitions into th... (by Anteeks)
by jeg19
Prime numbers in an interval
 
Write a program that prints all the prime numbers in the range of two user defined numbers: low and high. Create a function that checks for a number to be prime...
[4 replies] Last: what does the std::cin >> low; do? It usually does the same as: ... (by keskiverto)
Strange Error, Possibly Linked With Deque
 
Recently I have been trying to remake the classic game Snake in C++. I came across this strange error which had no logically deductible cause (I'm probably just...
[2 replies] Last: Thanks (by Balajanovski)
by casu4l
Please help with how to manage a yatzy game
 
Ok so I'm trying to write a yatzy game for my c++ class but I'm really unsure almost clueless about how to manage with the part when to save dices and keep on ...
[2 replies] Last: Line 10: That's not the best place to call srand(). srand() should b... (by AbstractionAnon)
Lottery application project help
 
Hey guys I'm a beginner at programming and I'm trying to write an application that will generate 5 random numbers from 0-9 and then ask the user to input 5 numb...
[1 reply] : Here is a way to generate the numbers without duplicates. #include <... (by closed account LA48b7Xj)
Help with structures
 
Okay so I have a c++ project due soon involving structures. I'm trying to sort an array of structures in increasing sales using the bubble sort but I keep getti...
[2 replies] Last: Line 41-44: tempProducts is a type name, not an instance. You can't ... (by AbstractionAnon)
(Console) I need to output txt, one character at a time to look like somebodies typing.
 
HI all, I am creating a simulation kind of game that will be programmed for the terminal/console, I am looking for a way to get txt to output as if somebody was...
[8 replies] Last: @ JLBorges, you are a genius, and I sincerely thank you for your help ... (by Cbasic88)
Sum of Single Input in Recursion Function
 
Lets say I have a single input of the value 5432 . I want these values to be added together like this: 5 + 4 + 3 + 2 = 14 What are the different wa...
[1 reply] : #include <iostream> using namespace std; int sum_digits(int n) { ... (by closed account LA48b7Xj)
binary search giving errors
 
binarysearch not working My errors are: lab#7.cc:139:3: error: stray ‘\342’ in program int last = numElems − 1; ^ lab#7.cc:139:3: erro...
[1 reply] : Try retyping the (-) minus. (by closed account LA48b7Xj)
Error on compiling functions from header and cpp files
 
I was a given a question which includes a Dress class, a Shoes class and an Outfit Class. I've written all the mentioned classes above but I cant compile them i...
[7 replies] Last: So, there are two points here: 1) You need to rework your design, as... (by MikeyBoy)
My project Pls Help
 
hi can you help me to this one this is my project and i want to finish it this program output is F1 Carbonarra 2 110 F1 Carbonarra 2...
[1 reply] : Dupe Post - >http://www.cplusplus.com/forum/general/199698/ (by SamuelAdams)
by Rebug
Comparing strings inside an if else statement
 
I'm trying to figure out how to compare strings inside an if else statement. Well my string is named country and right after I ask the user to input the name of...
[2 replies] Last: if( age < 19 || country == Serbia || country == Peru ) std::cout << "... (by JLBorges)
msoftcon.cpp
 
hello everyone ; I was in chapter 13 in object oriented programming in c++ fourth edition(I know it is out of date but after 12 chapters it would be better to ...
[3 replies] Last: See: https://msdn.microsoft.com/en-us/library/dybsewaf.aspx https://m... (by coder777)
How to make vending machine program
 
Hello. I was assigned a project to make a program that will be like a vending machine. The vending machine has 3 drinks. With only 10 bottles of each. It has to...
[8 replies] Last: Hello, You declared the function as: void EnterMoney(arguments); "vo... (by Nico)
October 2016 Pages: 1... 2829303132... 51
  Archived months: [sep2016] [nov2016]

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