Beginners - October 2015 (Page 29)

Functions?
 
Write your question here. Okay so I wrote the first code for leap years a few weeks ago, but I would like to know how to properly define and use the functio...
[3 replies] Last: Line 25: Get rid of the else . It's not associated with an if. Lin... (by AbstractionAnon)
loop to find prime numbers between 1 - 239
 
I am working on a program in which I must print out the number of primes, including 1 and 239, from 1 - 239 ( I know one and or two may not be prime numbers, bu...
[1 reply] : If you use for loops, you can practically translate your English direc... (by dhayden)
Call By Value/Call by Reference assignment help.
 
I'm working on a homework assignment for class and am absolutely stumped by what I need to do. I'm asked to call an overloaded function that will calculate sum ...
[6 replies] Last: If your code for your summing function is the same as in the opening p... (by fg109)
Student GPA Inheritance Program Problem.
 
I am new to C++ programming and I have working with program for days now. This program using inheritance techniques. The asks the user to "Enter 1 for undergra...
[12 replies] Last: Thank You, for all of your assistance and patience. (by gneisler)
Array Elements Issue..
 
I am having some issues with my code and i cannot figure it out how to fix it since I am a beginner in c++, can someone help me on how to fix the issue with my ...
[6 replies] Last: but still I only get 0 as an answer Of course that's what happens. ... (by closed account 48T7M4Gy)
arrays ascending & descending
 
I dont know what i did wrong an error keeps popping up. #include <iostream> using namespace std; class project { private: int nums ; void ch...
[4 replies] Last: It keeps saying 'control reaches end of non-void function' You ha... (by cire)
String into a int loop
 
So Im trying to have the user be able to type the word done (and have the program stop), into a loop that finds the average of up to 15. I cant figure out how, ...
[5 replies] Last: [quote=b29hockey]i do not understand what you did there, or how to imp... (by LB)
Using a string to verify a part number
 
I'll start off by admitting this is a homework question- I am not asking anyone to do it for me, just to point me in the right direction because I've been readi...
[14 replies] Last: True but I think we should be mindful of the potential for plagiarism (by closed account 48T7M4Gy)
by Smoky
Multy thread Global Variable
 
Hello everyone. In my program i have main() which runs 2 different cpp files, of which one reads info from TCP and the other uses information to control move...
[5 replies] Last: Within a thread of execution, accesses (reads and writes) to all vola... (by JLBorges)
type casting in unavoidable circumstances
 
Hello, I want to add a certain integer (say 10) at a certain index(say 5) of a vector. For this i am trying to make a following comparison in my code ...
[2 replies] Last: Okay. Thank you for your response. (by saherch)
Illegal Expression Error
 
Current Problem; I'm getting an "Illegal expression error" Prompt; 10. Corporate Sales Data Write a program that uses a structure named CorpData to store t...
[1 reply] : CorpData is a type. You can't pass types to function in the argument l... (by Peter87)
error C2064: term does not evaluate to a function taking 2 arguments
 
Could anyone help me to spot the error ? I dun even know what is wrong with my coding. #include<iostream> #include<string> using namespace std; void mc...
[4 replies] Last: Thanks! The program could be compiled now ! (by jekaterina)
by st4evr
C++ Outputting the sum and product of a set of numbers
 
Beginner C++ student here, first programming class. I am trying to build a program which will accept a set of numbers from the user and output the sum and produ...
[2 replies] Last: Thank you for that! That did it. In one version of this I had initiali... (by st4evr)
Seven Days coin toss Program
 
I need to write a program that recreates the Battle of Seven Days using Coin flips, but I cant seem to get the score to increment correctly /* Program created...
[11 replies] Last: @whitenite1 Thank you so much for all of your help! (by Akroncs)
ignore causes empty string
 
I'm trying to understand why exactly cin.ignore causes my string to be empty in this code: string text; do { cout<<"Enter a string"<<endl...
[2 replies] Last: Ahh, I see! I didn't know it would "wait" for me to enter something to... (by anarelle)
Hey i need some help
 
So i want to make a program that takes 2 3-digit-numbers, A and B, and when I add those numbers the result is C, which is a 3-digit-number, but the catch is th...
[2 replies] Last: use rand(): int r = rand(); (by hdj)
by Andym
can someone explain what my teacher means by this statement
 
In the overridden << operator code, print the base class data without calling a base class print method I know we are working on derived classes.....
[2 replies] Last: Good or bad, I interpret the question as writing an overloaded operato... (by closed account 48T7M4Gy)
Pick up sticks game!
 
Hello there! So I've recently made a pick up stick game and Im pretty lost. The code keeps going past 0 and I'm not sure how to stop it.. Im also trying to say ...
[4 replies] Last: Also not sure how to indicate which player has won. Maybe I need more ... (by supaahdan124)
Unable to create extern int in Header File
 
Hey everyone, this is my first time trying to use an extern int. Anyways, I was wondering if someone could explain to me why it wouldn't work to include it in...
[1 reply] : You can't mark a variable extern and also give it a value - it's one... (by LB)
Loops
 
Here is the scenario: Modify your code to check for valid input values. Specifically: The Wholesale Cost must be positive. { I.e. not zero or negative } ...
[4 replies] Last: I keep on getting errors! I am so confused: // Variable Declarations ... (by beccak0316)
October 2015 Pages: 1... 2728293031... 57
  Archived months: [sep2015] [nov2015]

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