Beginners - July 2014 (Page 18)

array random
 
I am trying to make a five digit random number using an array i cant figure out how to do it can someone help please.
[3 replies] Last: use a "for" loop. to be more specific,see this code: int random ; fo... (by bigsoft)
Arrays
 
Hi there, I'm really new with programming, I haven't done any before this class I am taking now, so I'm really struggling. I know it's really simple, but I...
[3 replies] Last: Thank you SO much, this is extremely helpful!! I really appreciate it! (by VisuAlly)
by marcoE
How to redefine a constructor from parent class
 
Hello guys. Firstly I don't really know if this is possible. This is my Class Diagram: https://dl.dropboxusercontent.com/u/710615/class%20diagramV4.png ...
[1 reply] : Hoah, take a look at the virtual keyword. (by iQChange)
How do I output to a printer?
 
I am a complete beginner but i can't seem to find an answer via Google, etc. The simple question is... How do i output a simple string to a printer instead ...
[2 replies] Last: I think you can still open a simple printer device with "PRN" or "LPT1... (by Duthomhas)
cout commands not displaying
 
hi! i'm writing a game but when i compile and run the program the cout commands in the if and else if statements do not show. what's wrong with the code? ...
[9 replies] Last: yep! it's working! thanks everyone! (by sebaethefish)
no matching function call
 
On line 68 I keep getting an error that says "No matching function for call to 'getHighest'. I have googled and found other people with the same assignment and ...
[14 replies] Last: I don't have time to give a full reply right now (though i should be a... (by Chervil)
Hello World not working
 
Hello there, I am very new to c++, and I am having some problems running the Hello World! program on my mac. I have both Xcode and command line tools installe...
[3 replies] Last: Sorry but I'm a windows user and got no idea about mac. I don't know i... (by TheTendo)
Did I miss something about cin operator?
 
What did i do wrong? i can't output name and year. #include <iostream> #include <string> using namespace std; int main() { cout << "Please enter ...
[1 reply] : I think the problem is that you are multiplying the year variable to t... (by discofire)
Help with arrays and functions.
 
This is the assignment: The local Driver's License Office has asked you to write a program that grades the written portion of the driver's license exam....
[8 replies] Last: I will try using this: student_input_answers = (char)toupper(stud... (by madelinelise)
why does it gives me a random number instead of syntax error?
 
I was programming a program to calculate the area of a rectangle. I wrongly typed : cin >> width , length ; instead of the correct one : cin >> width >...
[6 replies] Last: Yes , I mean the compiler. How to turn on more warnings ? I use Code... (by Maths Lover)
by SVcpp
Valid C++ if statement?
 
Hello, I just took a practice test for a midterm exam I have tomorrow. My teacher has been very persistent about getting this one statement through my head,...
[5 replies] Last: i never know that this is legal xD (by xenovia12)
Incrimination - increase by 1
 
Here's the question: The Base class should include a static attribute and getter method for attribute _id - all humans will have an id stamped on their neck. Th...
[5 replies] Last: if this is assignment, i assume youve got wrong info from you classmat... (by xenovia12)
calculating final grade using median
 
This code is correct it runs correctly I just have a question about something pertaining to the median. It says near the bottom of my code that mid is equal to ...
[2 replies] Last: the median is after sorting the values the 2 middle values will be ad... (by xenovia12)
[Noob question] What does it mean by returning a value?
 
I'm currently on function tutorial page. In laymans term what does it mean by "returning a value" How do i know if the value returns something or not?
[4 replies] Last: for the simplest explanation and code heres the code int main() { ... (by xenovia12)
open a file from a folder with ifstream
 
I want to cout a file called "colist"(Not a .txt), but it's not on the main folder, I'm not getting any issue when I load the file on the same folder than the m...
[1 reply] : backslash is used to escape characters, so \c in "bin \c olist" will... (by Peter87)
Separating Digits of an Integer
 
Hi, I'm trying to write a program that reads in 4 unknown digits and them outputs then like this: Input: 3412 3 *** 4 **** 1 * 2 ** My code right now reads th...
[6 replies] Last: an alternative approach #include <iostream> #include <cmath> using na... (by Yanson)
by ceci
Input Number, Output Characters?
 
I need to write a program where the user inters a 5-digit number and the program outputs exclamation points corresponding to the digit. So, it should look somet...
[4 replies] Last: Something like #include <iostream> #include <sstream> int main() { ... (by Maharaja)
by mehak
paranthesis count
 
i am trying to implement balancing of braces by using stacks however i dont get the correct output,please help! #include <stdio.h> #include <string.h> #...
[2 replies] Last: thnx alot:) (by mehak)
Class and array program
 
The issue that I'm having is with the output, ex: 1.65516e-313 instead of the calculated gross pay amount. What is wrong ? Any assistance will be appreciated. ...
[8 replies] Last: Sorry for the late reply, just wanted to thank all of you for your hel... (by homedad)
Can I please gett help with this last section
 
Ok I have been struggling with this code and I think I have it written out right but here is the rules from my teacher 1 = implies right Number, Right Place....
[6 replies] Last: for (int i = 0; i <digits; ++i)//telling which numbers is correctand ... (by LendraDwi)
July 2014 Pages: 1... 1617181920... 43
  Archived months: [jun2014] [aug2014]

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