Forum: C++ Nov 21st, 2008 |
| Replies: 5 Views: 517 Okay I figured out the default constructor. Now I need to create a function named "playerChoice" which changes the stored array value into whatever the player's space that is chosen and replaces it... |
Forum: C++ Nov 21st, 2008 |
| Replies: 5 Views: 517 Hello, I am trying to declare a 2D array (3x3) inside of a class.
I have it set up like this:
GameBoard.cpp
#include "GameBoard.h"
#include <iostream>
using namespace std; |
Forum: C++ Nov 12th, 2008 |
| Replies: 4 Views: 392 Okay, I figured out the destructor. Now I am having trouble with the "ostream & displayPoint (ostream &)" function.
Using "out" as the ostream variable, both "out << crud" and "return out" aren't... |
Forum: C++ Nov 12th, 2008 |
| Replies: 4 Views: 392 What should the destructor look like? Also, where should I go next with my code? |
Forum: C++ Nov 12th, 2008 |
| Replies: 4 Views: 392 Hello everyone,
I am having some difficulty with a class assignment, partially because the professor has assigned it before we have covered the material. I have created a general case for the... |
Forum: C++ Nov 3rd, 2008 |
| Replies: 4 Views: 408 Basically what happens is I need the value to be updated. Essentially I have a mesh grid that fills in values from the bottom up (recursion). So in order to know the target value I must know the... |
Forum: C++ Nov 3rd, 2008 |
| Replies: 4 Views: 408 Well I figured the function wouldn't be necessary. I can just make one statement. Ignore that.
Sorry for late response. |
Forum: C++ Nov 3rd, 2008 |
| Replies: 4 Views: 408 Hello everyone, I am a Mathematics major and my mentor asked me to put together a program that evaluates explicit stencil methods along the difference mesh. Basically I need to use a recursive method... |
Forum: C++ Oct 20th, 2008 |
| Replies: 1 Views: 439 Hello everyone,
I am trying to get a head start on this week's program, as it seems to be a long, albeit relatively easy, program. I wanted to double check with the experts here to make sure the... |
Forum: C++ Oct 10th, 2008 |
| Replies: 6 Views: 659 What would a flowchart look for this? |
Forum: C++ Oct 10th, 2008 |
| Replies: 8 Views: 1,068 Hmm... I'm trying to figure out who that post was intended for. |
Forum: C++ Oct 9th, 2008 |
| Replies: 8 Views: 1,068 What would a flowchart for this program look like? |
Forum: C++ Oct 4th, 2008 |
| Replies: 8 Views: 1,228 Here is what helped me if anyone else is having this same problem:
while (infile2 >> num)
{
if (count3 == 0)
{
max = num;
min = num;
} |
Forum: C++ Oct 3rd, 2008 |
| Replies: 8 Views: 1,228 I have tried a variety of methods, but can't get the loop to store a max number. Can someone help?
while (infile >> lastName && infile >> firstName && infile >> mInitial)
{
revName =... |
Forum: C++ Oct 3rd, 2008 |
| Replies: 8 Views: 1,228 I was thinking I should do it along those lines. In order to do this do I need to check every value that I read in? Should I compare every new value with the one stored at min and max?
Thanks |
Forum: C++ Oct 3rd, 2008 |
| Replies: 8 Views: 1,228 Alright everyone,
The program I currently have running has a while-loop with an embedded while-loop. I now need to calculate the max and min, but the only way I can come up with to do so is using... |
Forum: C++ Oct 2nd, 2008 |
| Replies: 8 Views: 1,228 Thank you, that is extremely helpful. I am going to put together some code and then post back what I come up with. Thanks again. |
Forum: C++ Oct 2nd, 2008 |
| Replies: 8 Views: 1,228 Hello everyone,
I am having a really difficult time getting this program off of the ground. I need to use a while loop to read data from a file and then read tonnage numbers corresponding to... |
Forum: C++ Sep 24th, 2008 |
| Replies: 15 Views: 1,216 Hey, yeah that was the coding error I was talking about. I fixed it and it seems to be working, I am going to record the problem as solved. Thanks a bunch.
+ rep |
Forum: C++ Sep 24th, 2008 |
| Replies: 15 Views: 1,216 Oops. I ****ed it on that last section of code. Now it seems to be working and this is my final code: I am going to look it over a little before I submit it for good.
#include <iostream>... |
Forum: C++ Sep 23rd, 2008 |
| Replies: 15 Views: 1,216 |
Forum: C++ Sep 23rd, 2008 |
| Replies: 15 Views: 1,216 |
Forum: C++ Sep 23rd, 2008 |
| Replies: 15 Views: 1,216 I'll try that in a few minutes, but I think this is more along the lines of what my professor wanted us to do.
Thanks |
Forum: C++ Sep 23rd, 2008 |
| Replies: 15 Views: 1,216 Thanks for the thought, but our class has not progressed that far yet.
I could do so in this manner, but I am trying to learn to master the methods we are learning at the moment rather than... |
Forum: C++ Sep 23rd, 2008 |
| Replies: 15 Views: 1,216 I thought so too. I tried removing them, but the program would not work without having them there. Is there something I can do to avoid using them? Without them I get the else statement after every... |
Forum: C++ Sep 23rd, 2008 |
| Replies: 15 Views: 1,216 Got it. Can you run this and see if this works?
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main ()
{ |
Forum: C++ Sep 23rd, 2008 |
| Replies: 15 Views: 1,216 I know it is '\n', I made a keying error.
I have tried some of the suggestions on this thread: http://www.daniweb.com/forums/thread90228.html
Nothing seems to work for me. |
Forum: C++ Sep 23rd, 2008 |
| Replies: 15 Views: 1,216 Hello everyone.
I am trying to create a program that reads these values / strings from a file:
170 Lipstick
250 Orange Crush
350 Chickadee
450 Green Grass
550 Monaco
750 Toffee Crunch |
Forum: C++ Sep 5th, 2008 |
| Replies: 1 Views: 669 EDITTED
I DID figure it out but the (X-M)^2 term wasn't actually left off, it just was EXTREMELY hard to see. Oh well, sleep's overrated right?
Here is the solution in case anyone (is my class,... |
Forum: C++ Sep 5th, 2008 |
| Replies: 1 Views: 669 Hello everyone. I am new to coding, taking an introductory C++ class at Baylor University. I am trying to get this standard deviation problem worked out, but I just pulled an all-nighter on it... |