Forum: C++ Oct 30th, 2008 |
| Replies: 8 Views: 430 |
Forum: C++ Oct 29th, 2008 |
| Replies: 8 Views: 430 Re: Pointer / Linked list question I don't think just L and R will cut it.
Lets say your maze is a rectangle that has n number of points, and there are walls inside it that construct a number of paths. Now the user needs to take the... |
Forum: C++ Oct 24th, 2008 |
| Replies: 3 Views: 201 Re: Linker not working Are you positive you have the shared library wld.so in your
/home/vincenzo/software/borealis-projects/LoadDistributionTool ?
And what is this supposed to be ? ${BOREALIS}/nmstl/bin/wtf ? its not... |
Forum: C++ Oct 24th, 2008 |
| Replies: 5 Views: 331 Re: Where is the Memory Leak ? I think what is happening is this
Tblk A;
Tblk B = A;
This is using a default copy constructor since you haven't defined one, and both your objects A and B are pointing to the same set of... |
Forum: C++ Oct 23rd, 2008 |
| Replies: 7 Views: 339 |
Forum: C++ Oct 22nd, 2008 |
| Replies: 7 Views: 339 Re: priority_queue help Your priority_queue should be building a max_heap with the highest value at the top. Have you tried printing the contents of your queue after you finish building it, to see if the elements are in... |
Forum: C++ Oct 22nd, 2008 |
| Replies: 4 Views: 326 Re: bucket or radix sort not sure but need help Here is a tutorial on bucket or bin sort. Link (http://en.wikipedia.org/wiki/Bucket_sort)
Each array of yours will be a bucket. You can create as many arrays as the buckets you'll need. Then sort... |
Forum: C++ Oct 22nd, 2008 |
| Replies: 6 Views: 539 |
Forum: C++ Oct 22nd, 2008 |
| Replies: 7 Views: 339 Re: priority_queue help When you insert your elements into the queue, you have to insert them so that the timestamps are sorted in descending order. That way when you dequeue your first element, you should get the correct... |
Forum: C++ Oct 22nd, 2008 |
| Replies: 6 Views: 539 Re: Printing array of characters backwards Well .. I have no idea why your teacher would say that, but its really bad practice.
Now onto your code. Surprised it didn't crash. Your store_char() function does not have i initialized, and... |
Forum: C++ Oct 22nd, 2008 |
| Replies: 6 Views: 539 Re: Printing array of characters backwards First of all, its good practice is to put your class declarations in a header or a .h file, put your definitions in a .cpp file and then include the .h file, where needed.
You really should not be... |
Forum: C++ Oct 22nd, 2008 |
| Replies: 7 Views: 339 Re: priority_queue help I am a little confused by your queue implementation. Usually your queue functions would be enqueue to add the elements to the queue, and dequeue to get the first element you added off the queue,... |
Forum: C++ Oct 22nd, 2008 |
| Replies: 12 Views: 553 |
Forum: C Oct 21st, 2008 |
| Replies: 6 Views: 318 Re: HELP!!!! A void function would generally look like this
void foo(){
return;
}
But trying to do this is wrong. |
Forum: C++ Oct 21st, 2008 |
| Replies: 2 Views: 530 Re: C++ Array pointer problem Well your variables below are local to the function. So when you leave the function, they don't exist and so their addresses now probably point to garbage values.
You should copy the values over... |
Forum: C++ Oct 21st, 2008 |
| Replies: 12 Views: 553 Re: Prime Number Also in addition to the braces, your logic is messed up. See the comments in your code.
for ( int i = 2 ; i < num; i++ )
/* you can add a special case for 2, you only need to check for the... |
Forum: C++ Oct 21st, 2008 |
| Replies: 8 Views: 326 Re: Need help removing number from an array Its not deleting 3 numbers. Your for loop prints the numbers starting at index i instead of 0, so you "think" they are deleted.
You might want to delete the number and then call your print function. |
Forum: C++ Oct 21st, 2008 |
| Replies: 12 Views: 553 Re: Prime Number I am curious ..
how did you get this to compile ?
if ( ( i == 2 ) or ( i % 2 != 0 ) )
There is no keyword called "or" in C++ its denoted by "||" |
Forum: C++ Oct 21st, 2008 |
| Replies: 8 Views: 326 |
Forum: C Oct 21st, 2008 |
| Replies: 3 Views: 376 Re: How to return 2 values from function Pass them in as pointers from your calling function.
void fbExeCode(int BldCnt, char* fCodeAddr, char* tmpAddr){
}
A few things to be careful about. If you want to allocate them in fbExeCode,... |
Forum: C++ Oct 21st, 2008 |
| Replies: 8 Views: 326 Re: Need help removing number from an array You aren't assigning the variable index a value before calling the functions removeAt and insertAt. So you need to fix that first.
Well I just noticed that you are asking for the index in your... |
Forum: C++ Oct 19th, 2008 |
| Replies: 16 Views: 677 Re: C++ Midterm Help Please! Looks good ! I have one suggestion.
Instead of having a standard array "steps" you could write a BaseGenReverse, similar to your teacher's BaseGen function and use that instead. So if the size... |
Forum: C++ Oct 18th, 2008 |
| Replies: 15 Views: 703 |
Forum: C++ Oct 18th, 2008 |
| Replies: 15 Views: 703 |
Forum: C++ Oct 18th, 2008 |
| Replies: 25 Views: 1,006 Re: Master's Thesis - C++ Well I am not sure how things would work, if you had parts of it pre-approved by professionals. From what I know, and what I've seen my classmates do, pretty much all of their theses had to be read,... |
Forum: C++ Oct 18th, 2008 |
| Replies: 2 Views: 237 Re: Multimap in Class lol .. contrary to popular belief, we are not clairvoyant, so you need to elaborate on what you are doing , what your problem is and post some code you've worked on !! |
Forum: C++ Oct 18th, 2008 |
| Replies: 4 Views: 507 Re: Output Binary Search Tree to file help comparsions are case sensitive, so you will need to use either toupper or tolower to make them the same.
I am not sure what you mean by not allowing the punctuation. But what the function strtok... |
Forum: C++ Oct 18th, 2008 |
| Replies: 5 Views: 623 Re: getline from file Here is a link that mentions how the fstream getline works Link (http://www.cplusplus.com/reference/iostream/istream/getline.html)
What you need to do is
SortedBinary.getline(myBuffer, mySize,"... |
Forum: C++ Oct 18th, 2008 |
| Replies: 16 Views: 677 Re: C++ Midterm Help Please! You don't need to make your program distinguish between a decimal and a binary input. All you need to do is prompt a user for a decimal number and then send it to your routine.
A couple of things,... |
Forum: C++ Oct 18th, 2008 |
| Replies: 15 Views: 703 |
Forum: C++ Oct 18th, 2008 |
| Replies: 16 Views: 677 Re: C++ Midterm Help Please! Here is an article that elaborates on how you can convert a decimal number to a binary.
Link (http://www.wikihow.com/Convert-from-Decimal-to-Binary) |
Forum: C++ Oct 18th, 2008 |
| Replies: 15 Views: 703 |
Forum: C++ Oct 18th, 2008 |
| Replies: 16 Views: 677 Re: C++ Midterm Help Please! Sigh !!
All you need to do is write a function using the prototype
string DtoB (int Decimal)
that takes a decimal number <= 255 as the input, converts it to its binary form, stores the result in... |
Forum: C++ Oct 18th, 2008 |
| Replies: 8 Views: 325 Re: Help...... Add Code Tags Please !!!
And there is no #include<iostream.h>
its #include<iostream> |
Forum: C++ Oct 18th, 2008 |
| Replies: 12 Views: 615 |
Forum: C++ Oct 18th, 2008 |
| Replies: 25 Views: 1,006 Re: Master's Thesis - C++ I never wrote a thesis for my Masters, did more of a set of research papers, but honestly I haven't come across any that are more than a few hundred pages.
On a practical side, you do understand... |
Forum: C++ Oct 18th, 2008 |
| Replies: 6 Views: 341 Re: Tree traversal At first glance, your traverse function is declared as a void, yet you are doing
result = tree.traverse(INFIX, printData(data));
This is not valid. I don't know what result is, but if its a... |
Forum: C++ Oct 18th, 2008 |
| Replies: 16 Views: 677 Re: C++ Midterm Help Please! You need to make an effort to write something .. you cannot honestly expect someone to solve your midterm exam for you. |
Forum: C++ Oct 17th, 2008 |
| Replies: 9 Views: 295 Re: Help with the goto thing. not ... exaaactly !!
bool is a datatype .. so you cannot do bool == smthing
I don't know what you're trying to do, but here are some modifications.
bool test;
string input; |
Forum: C++ Oct 17th, 2008 |
| Replies: 5 Views: 333 |