See, it only took you a day and you didn't need help at all. Good job.
Type: Posts; User: markcole
See, it only took you a day and you didn't need help at all. Good job.
Yes, it could work. Difficulty level of about 11.4.
No.
I ran it and player 1 won on the first move every time by selecting position 1, so I think there is an error on how you determine the winner.
As for the logic, it is fine, but if I win 5 rounds,...
Correct me if I am wrong, but you check for a winner
if(checkDiag(board) == 1 || checkNondiag(board) == 1)
then have one of them take a turn.
while(move < 1 || move > 9)
{...
I don't see where you set win back to zero after a game.
Ninja'd!
Start your own program and go step by step, implementing each "YOUR CODE" segment one at a time.
Start with a simple "main()" that calls "set_array_rand(a, 50)", get that working, and so on. ...
No offense, but you didn't look very hard if you didn't find anything useful. A simple search on google for pthread and there are a bunch of links that give explanations.
Also, use the link that...
Just use your for loop, but compare the sex of the student with the desired sex for the average
Something like:
int average, count = 0;
for (i = 0; i < n; ++i)
{
if (sex = 'M')
Just check the sex of the student before adding their grade in. You would either need to count the different sexes or keep a running count as you add the scores in.
If you are just wanting to know if it is a straight line or not (as in a yes or no answer), just ask yourself how you would check that with pen and paper, then implement the same check in code.
What does the rest of it look like?
Normally I would agree that it is a "Obvious/stupid question", however in this case...
Thanks for the second set of eyes.
Well I "figured out" what is wrong. Kind of.
The base class has some virtual functions in it and therefore I had the destructor declared as virtual. Additionally, I have the base class compiled...
Of course gdwarf-2.
I tried a generic class/subclass program and it worked fine. I guess it is something I am doing not quite right.
Thanks for the help...
class object {
private:
int id;
public:
object(int id) : id(id) {}
int myBaseData;
};
class physical_object : public object {
private:
I have a class that inherits many variables from the parent. The program works in that all the variables are accessable in the program.
I am having a problem viewing the data in GDB. A place...
IMHO, It takes pratical experience to learn programming. What you learn in class is good ground work, but you will really learn a lot when you are on a real project that people actually care about...
If you are wanting to create your own log files for a program, you can redirect stdout and stderr to the files you wish after you create them.
You could have a semaphore for the data and a flag that is set as to whether the 2nd thread has saved the data.
The first thread processes the data and sets a flag that is shared. The first...
Which OS?
Excellent. Thank you for that.
If this has been answered, forgive me.
I have a series of files that I need to read in. I only care about the first field (seperated by spaces) on each line and each line is varying lengths.
for...
What salem gave pretty much covers software development. There is no step-by-step process to follow. 90% of it is off the cuff. You use the documents and processes you need and what is required by...
Have you stepped through it to see it change there? I see no reason why the value of quads should change to 3....
Based on the example, I am guessing the number of characters you can display at once. Again, based on your function to the LCD.