Search Results

Showing results 1 to 18 of 18
Search took 0.01 seconds.
Search: Posts Made By: mahlerfive
Forum: C++ Jan 20th, 2009
Replies: 6
Views: 544
Posted By mahlerfive
Just tested it with the changes mentioned, and it works for me too.
Forum: C++ Dec 9th, 2008
Replies: 1
Views: 316
Posted By mahlerfive
Instead of: int board[4][4];
Replace with: int** board;
Now we can dynamically allocate space for the 2D board array.

In set_board(), we need to do the dynamic allocation like so:

// First...
Forum: Java Dec 9th, 2008
Replies: 4
Views: 430
Posted By mahlerfive
The lowercase part you have actually won't work for all cases...

What I would do is just have a boolean variable for each condition, and each check will set the appropriate variable to true or...
Forum: C++ Dec 9th, 2008
Replies: 2
Views: 344
Posted By mahlerfive
The other option is to just sort both arrays which will make traversing the arrays and finding non-duplicates much easier.
Forum: C++ Dec 8th, 2008
Replies: 8
Views: 575
Posted By mahlerfive
Not sure where to start on this one... You haven't really followed the instructions. The instructions state that EACH student data record should be dynamically allocated. Instead your student list...
Forum: C++ Dec 8th, 2008
Replies: 7
Views: 508
Posted By mahlerfive
When adding the node at the end (as you are now doing), you should have the new node point to NULL instead of head. The reason you get it infinitely repeating is because when your end node points to...
Forum: C++ Dec 8th, 2008
Replies: 7
Views: 508
Posted By mahlerfive
What exactly are the requirements? Are you supposed to be adding new nodes to the beginning of the list or the end of the list? Are you sure you are not supposed to get the result you got?

In the...
Forum: C++ Dec 8th, 2008
Replies: 7
Views: 508
Posted By mahlerfive
Since you are adding nodes to the head (start) of the list, the last node you add will be in position 0. The output is correct for the example you gave. I'm assuming the list isn't supposed to be...
Forum: C++ Dec 5th, 2008
Replies: 3
Views: 390
Posted By mahlerfive
To add two times as you have listed, first add the seconds together. If the seconds > 59 you will have to use modulus (%) to find the remainder of the seconds. You can then use this information to...
Forum: Java Dec 3rd, 2008
Replies: 4
Views: 514
Posted By mahlerfive
Generally when you are doing recursion on any kind of collection of items (lists, arrays, even strings) you want to solve the problem for the first element of the collection, then recurse on the...
Forum: Java Nov 30th, 2008
Replies: 4
Views: 492
Posted By mahlerfive
You shouldn't ever be returning the operators though, only the result of operations or the number value in the node.

In the first branch, after you apply the operator to the two children, you...
Forum: C Nov 28th, 2008
Replies: 2
Views: 427
Posted By mahlerfive
You have allocated space for all of the studentInfo pointers here (except the last one, you should not be subtracting 1):
struct studentInfo *students[numOfStudents-1];

But, you have not...
Forum: C++ Sep 1st, 2008
Replies: 4
Solved: Input file data
Views: 579
Posted By mahlerfive
It should be readfile >> sample; since you are getting input, not outputting.
Forum: C++ Aug 24th, 2008
Replies: 4
Views: 1,248
Posted By mahlerfive
I have not used them, but I believe the boost library has threads and you can try pthreads as well.
Forum: C++ Aug 24th, 2008
Replies: 10
Views: 1,350
Posted By mahlerfive
I can guarantee you the problem is not winsock, it is something you are doing.

Can you post a little code where you are having the problem, tell us what you are trying to send and what you are...
Forum: C++ Aug 23rd, 2008
Replies: 2
Views: 478
Posted By mahlerfive
Vertices are the points or corners of a polygon. So a square is a polygon with 4 vertices, a triangle is a polygon with 3 vertices, etc.
Forum: C++ Aug 20th, 2008
Replies: 10
Views: 1,084
Posted By mahlerfive
To be a bit clearer, you can use the stringstream class like so:

#include <iostream>
#include <sstream>
using namespace std;

int main() {
stringstream ss; // our stringstream object
...
Forum: C++ Aug 14th, 2008
Replies: 3
Views: 497
Posted By mahlerfive
The first error means that the function ingresar_datos has never been declared - if you look through the code, there is indeed no function with that name.
The rest of the errors are because the...
Showing results 1 to 18 of 18

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC