Beginners - September 2014 (Page 31)

More help with grader
 
Hey, everyone. I was wondering if anyone could help me out with this program. Basically, I have to write a code that will grade an exam, which is a set of s...
[2 replies] Last: Okay so I did this: #include <iostream> #include <fstream> #include ... (by psychoticbear)
Calculating with vector containers
 
Hello everyone, I was wondering how to do calculations with data stored in a vector. To be more accurate, there are two problems for which I could not find an...
[2 replies] Last: 1st. Use loops: for(int i = 0; i < AVector.size(); ++i) BVecto... (by MiiNiPaa)
static function
 
I have a static function on my manager class that i am trying to use to set a private member in the manager class. I will be trying to access to access this st...
[5 replies] Last: You have to instantiate static members. Put this in your cpp file: ... (by Disch)
by Nezar
What does this keyword specify ?
 
Hello there, I know that the operator keyword is used to overload operators in classes, but i really can't find out what it stands for here, i did some searc...
[2 replies] Last: Thanks my friend :) (by Nezar)
Use Class Member By Reference
 
I would like to operate on a member of my class from a separate .cpp file. At the moment i am getting an error. Oh and don't worry about the UFUNCTION/UPROPE...
[3 replies] Last: ADungeonExplorerCharacter *MyCharacter; This is just a pointer. It d... (by MiiNiPaa)
I need helpful critique for school assignment.
 
I'm very new to c++ I started a few weeks ago at school, this is one of the project assignments. I was hoping for some input on what I did or what I should have...
[6 replies] Last: Lines related to "generating" a number; unsigned change = time(0); sr... (by MiiNiPaa)
problem with my function
 
i have a problem in my code http://codeviewer.org/view/code:440f the exp is not adding to 20 when win
[12 replies] Last: okay thank you .. i understand it now a lot (by xenovia12)
help understanding it
 
can someone please explain how we're getting the n=2, n=4, n=1, n=1, n=3, n=0? #include <iostream> #include <iomanip> #include <time.h> using namespace...
[2 replies] Last: thank you, very clear now. (by alielsaadi)
Exam Grader
 
Hey, everyone. I was wondering if anyone could help me out with this program. Basically, I have to write a code that will grade an exam, which is a set of s...
[1 reply] : 1) If you want to get grade from your function, you should indeed retu... (by MiiNiPaa)
by Salad7
If i pass a value into the constructor of a sub class...
 
Example::Example(int y, std::string z) { age = y; name = z; ------If i do this to the constructor ^ } { ------Do i still have to create a setMethod like th...
[1 reply] : The answer is: whatever you need. If you need to modify data after cre... (by MiiNiPaa)
Monthly Payment Loan
 
I'm doing the Loan Monthly payment homework. Everything works fine, but the formula just doesn't work, like I don't know what else to do, somewhere I read that ...
[5 replies] Last: P = ( r * A ) / ( 1 - (1+r)-N) Where, P = Payment Amount A = Loan ... (by lonelylense)
how to find position of newline in string (getline)
 
Write your question here. I need to find the position where enter where pressed to get newline. and somehow get that position out as an integer and put it in ...
[11 replies] Last: Post the answer and mark the question as solved. (by Yay295)
by Salad7
Passing in a pointer parameter to set it to another parameter
 
Lets say we have a class named Test. I want to pass in a pointer of type int so i can set the parameter equal to my variables in my class. It's basically Why c...
[2 replies] Last: I figured it out i was confused with pointers at the time (by Salad7)
shuffle
 
Define a function int * shuffle (int * p1, int length1, int * p2, int length2) that "shuffles" the arrays where the first array has base address ...
[2 replies] Last: You must use pointer notation throughout the function (no square brac... (by Disch)
Pascal's Triangle
 
Define a function int ** pascal(int rows) that returns a triangular array containing the values of Pascal's triangle. For example if rows is 6 ...
[no replies]
Calculating Volume and Surface Area of a Sphere
 
The surface area calculation is calculating right but my volume is off for some reason. Can someone help me figure out what I am doing wrong. Input = 2; Outp...
[4 replies] Last: Yes, your method will work too. The key is to avoid the integer divisi... (by dhayden)
Static variables
 
I get garbage values when i don't declare the variable as static in my function and call it from main method. OUTPUT: http://postimg.org/image/rufgh6tsx/ Cod...
[2 replies] Last: #include <iostream> void showstat(int curr) { int nStatic; nSt... (by closed account 48T7M4Gy)
Calculate Fibonacci with dynamic array and recursion
 
Here is a program to calculate the fibonacci number. I use a int function to calculate the fib num and I just want to use the int function in another function p...
[2 replies] Last: Thank you, Yay295. I finally figure out the function cal, I forget the... (by heisadobe)
Invalidating non numeric input entries
 
Hi, This is one of my first lab assignments. I was to create a very simple program to asks for the temperature in celsius which the program would convert to ...
[3 replies] Last: Thank you (by netomilt)
loop
 
I need help with an infinite loop for some reason my stopper will not let it exit. #include<iostream> using namespace std; int main() { int isla...
[4 replies] Last: I got it to work with the while(stopper !=3 && stopper != -1) Thank ... (by mtbrooks1993)
September 2014 Pages: 1... 2930313233... 51
  Archived months: [aug2014] [oct2014]

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