Beginners - October 2014 (Page 23)

Random numbers - user input seed
For our class the teacher wants us to use a user input seed for the srand function,, but every time it is called she wants it to have a different random number ...
Oct 22, 2014 at 8:14am
[8 replies] Last: I am asking from awheel18 , because they seem to want that. (by keskiverto)
Can't see my error
Most likely its a simple mistake but as a beginner I don't see it. Maybe I did't pay attention in class when this was taught. Thanks for the feedback. #inc...
Oct 22, 2014 at 7:39am
[2 replies] Last: cout << sortDescending(theArray, 5) << endl; This line doesn't make... (by mutexe)
by Jon15
Global variable and separate files
I am supposed to calculate Euler's number in a separate file to a given tolerance and return it using only global variables. After in cin a tolerance, it basica...
Oct 22, 2014 at 6:40am
[3 replies] Last: Still getting odd answers for my couts though (by Jon15)
by cyter
conversion error
Why am I getting this error when I compile code? error: conversion from 'rectangle*' to non-scalar type 'rectangle' requested my class is in a header fil...
Oct 22, 2014 at 6:36am
[4 replies] Last: Thank you kemort. (by cyter)
Need help combining while statements
I am taking my very first programming class and I hit a snag on my lab. The questions asks me to make a program to display the factorial of a number. That part ...
Oct 22, 2014 at 5:58am
[2 replies] Last: Damn you for making it seem so easy! But seriously thanks for the help... (by Endymion)
Help needed with vector, list and array please (1,2)
I need to do the following 1. Define an array of ints with the ten elements { 0, 1,2,3, 4, 5, 6, 7, 8, 9 }. 2. Define a vector<int> with those ten elements. ...
Oct 22, 2014 at 5:18am
[25 replies] Last: can someone please explain the for loops... http://www.learncpp.com/... (by anup30)
by bender
Getting Median From Array
I am trying to get a median from an array of which i do now know how many items are in it. I know I have to sort it, but I do not how to do this to get the medi...
Oct 22, 2014 at 4:57am
[3 replies] Last: Is this related to this: Will be, after the array is sorted it shows... (by closed account 48T7M4Gy)
difference between <int*> and <int>* with vector
What is the difference between the following lines of code? #include <vector> vector <int>* n; vector<int*> n;
Oct 22, 2014 at 4:33am
[2 replies] Last: JLBorges is the man (by theironlion23)
C++ compiler
Where can I download Microsoft Visual Studio for FREE? I don't have any money that's why I need a free and safe compiler. I am using Windows 7. I'm student...
Oct 22, 2014 at 3:52am
[9 replies] Last: ok thanks (by iamnoob15)
by HG319
Game using rand()
I had a lab where we had to write a program to simulate 10,000 duels for Aaron who hit his target with a probability of 1/3. Bob who has a probability of 1/2. C...
Oct 22, 2014 at 3:32am
[19 replies] Last: you are right! it has been a sleepless night. its 9:30am here - going ... (by anup30)
function calling, yearly calendar
I understand my start_day and num_day are undeclared right now. However, I am not understanding the concept of calling on a function. I am trying to call on a f...
Oct 22, 2014 at 2:54am
[8 replies] Last: is what i ended with and worked. int i; ... (by smokebaca)
Lab Help Please?
Hello, I am trying to program a simulation for a plasma cutter to cut circles but the results are not returning anything for the theta. Could someone be so kin...
Oct 22, 2014 at 2:40am
[2 replies] Last: Thank you for replying to my question, but I think I've got it solved.... (by BigNoah)
Classes & Constructors Question: What am I missing?
Write a full class definition for a class named GasTank , and containing the following members: A data member named amount of type double . A constru...
Oct 22, 2014 at 2:35am
[5 replies] Last: You declare a default constructor on line 7, but you do not appear to ... (by AbstractionAnon)
by bender
How to call a function
How do i call this function? It doesnt show up or i get errors void med(int howmany, int grades ) { if (howmany % 2 != 0){ int temp = ((howmany + ...
Oct 22, 2014 at 2:31am
[4 replies] Last: http://www.cplusplus.com/doc/tutorial/functions/ (by shadowCODE)
by bender
Calling a function
What do I put in main to call this function? I either get an error or it just does not get called [void med(int howmany, int grades ) { if (howmany % 2 != 0){...
Oct 22, 2014 at 1:25am
[1 reply] : Please use [co de] tags around code. Please show us how you are cal... (by Zhuge)
by Pg0715
receipt help with loops and strings
im trying to read from the file that has five items included in it, and if it has less than 5 items it will display an error as well show the tax and see if t i...
Oct 22, 2014 at 1:06am
[3 replies] Last: this is whats in the file 2.3 movie ticket 20.00 T water 2.25 T popco... (by Pg0715)
by cGuru
Error C2365
Goal: Use a struct that has 4 fields, input to those fields, and pass to function to display. Problem: (38) : error C2365: 'displaySData' : redefin...
Oct 22, 2014 at 1:00am
[4 replies] Last: Lets say the movie title is Harry Potter. When you first cin, it will... (by art1986)
read all calculated deductions into Premium due
explain please how can I get this code to read all calculated deductions into Premium due #include<iostream> #include<iomanip> #include<string> using n...
Oct 22, 2014 at 12:40am
[1 reply] : if (age > 25) cout << "Premium Age Reduction after $100.00 deductib... (by mobotus)
by Durp
Help with variable cubed array
Hey guys so I'm currently taking a class on C++ and am very new to it. I was screwing around and trying to figure out how to created a cubed array which the use...
Oct 22, 2014 at 12:33am
[1 reply] : This might help you. http://nadeausoftware.com/articles/2012/06/c_c_t... (by mobotus)
Make program choose BP and P policy
Write your question here. #include<iostream> #include<iomanip> #include<string> using namespace std; int main() { double age,GPA,num1,num2,multi_car ...
Oct 22, 2014 at 12:29am
[2 replies] Last: explain please how can I get this code to read all calculated deductio... (by happy11)
October 2014 Pages: 1... 2122232425... 70
  Archived months: [sep2014] [nov2014]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.