- Strength to Increase Rep
- +9
- Strength to Decrease Rep
- -2
- Upvotes Received
- 14
- Posts with Upvotes
- 14
- Upvoting Members
- 11
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re: Writing a book is a good idea, but I'm not sure that writing a book on software engineering is the way to go for a thesis. Both Master's and Phd theses are much usually more focussed in a certain area of interest. Plus it also depends to some extent on … | |
Hi, I looked for this information, but couldn't find it anywhere. Is there a difference between a "template class" and a "class template" or are they just two different ways of saying the same thing ? Thanks a lot. | |
Re: Well you are printing "result" without initializing it or assigning it a value. Is result supposed to be your GCD ? Then you probably want to move your print to [B][I]after[/I][/B] you have computed your GCD and assigned it to the "result" variable. Did you intend to have your "if" … | |
Re: Well what you are doing will recursively delete all the nodes. If you want to delete only current leaves, then you need to do something like this. I haven't tested this, so please try it out. [code=cplusplus] void BinarySearchTree::removeleaf(tree_node* p){ if (p == NULL){ return; } else{ if (p->left || … | |
Re: To access an element of the array "paths", you need to use the notation . not -> so its global_routing_info[neighbor].paths[no_paths].path_id = path; | |
Re: First off, please use code tags, it makes your code easy to read. Now your loops [icode] while (i<4) { cout<<'*'; i++; }[/icode] This will print out "****" Your next loop [icode] while (j<5) { cout<<'*'; j++; cout<<endl; i++; } [/icode] will add a "*" to the first line, then … | |
Re: for example on Linux you could compile using g++ -D_LINUX file.cpp -o output # turns on the #define _LINUX and on windows using g++ -D_WIN32 file.cpp -o output #turns on #define _WIN32 So if you had a makefile on both systems, you could set your compiler flags to reflect the … | |
Re: You already have an example.. try to use that to work out an algorithm For eg: inorder is : 2 3 4 5 6 7 8 preorder is : 5 3 2 4 7 6 8 then the Binary tree shld be ________5 ________/\ _______3_7 _______/\_/\ ______2_4 6_8 Hint: 5 … | |
I am really new to this, so please excuse me if this is a dumb question. I am saving some data using ruby on rails and one of those fields is a background for the divs I am rendering back on load. I created the partial layouts successfully but I … | |
Hi, I have some code which creates an extremely long table row, and I've been able to clean it up to a point where my performance is fairly decent. What I am trying to figure out is if its better in terms of speed to use divs as opposed to … | |
Re: You need to find out where the function BTRV is defined and then link to that library or object file. | |
Re: Your line[] array is local to each function, so your values really won't transfer between the two functions. Do you know how to pass arguments to functions ? If so then pass in a reference to your array as the argument for each function. | |
Re: Check out this link [url]http://www.cs.rpi.edu/academics/courses/spring06/cs2/resources.html[/url] | |
Re: Ok, I think this is roughly what you are looking for. You will still need to fine tune it to get the final answers you need. Some parts are hard coded, like assuming your associate id's range from 21 - 26. You might want to read those values in if … | |
Re: You could also initialize a float using float a = 0.1f; The f tells the compiler that its a float. | |
Re: Regarding the -25.00 .. I guess it would mean that the customer owes the bank 25 dollars as a service fee for letting the balance drop below their minimum balance .. You might want to throw a warning message if the customer enters a balance which is less than the … | |
Re: In your linker settings have you typed in the complete path to where fltk.lib is located ? By default it'll look for it in the current project directory. If fltk.lib is something you are supposed to compile also, then make sure that project is added as a dependency for your … | |
Re: What errors do you get from the compiler ? | |
Re: I would clean up the printf a bit by making it more readable. Also I am not sure why you are passing the argument "&menu" to your printf. Its incorrect in this context. Something like this would be much easier to read. [code]printf("1.Print list of students\n"); printf("3.Print list of those … | |
Re: 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 preceded by a libtool option. | |
Re: 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 path that will take him/her to the finish. … | |
Re: I think what is happening is this [icode] Tblk A; Tblk B = A; [/icode] 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 strings. So when you leave main, both A and … | |
Re: 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, simulating FIFO behavior. A stack on the other hand uses push and pop for LIFO … | |
| Re: Here is a tutorial on bucket or bin sort. [URL="http://en.wikipedia.org/wiki/Bucket_sort"]Link[/URL] Each array of yours will be a bucket. You can create as many arrays as the buckets you'll need. Then sort each array (bucket). And finally merge all the sorted arrays (buckets). Its pretty simple. The main thing is figuring … |
Re: 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 including your .cpp files in other files. The rest, coming in … | |
Re: I am curious .. how did you get this to compile ? [icode] if ( ( i == 2 ) or ( i % 2 != 0 ) ) [/icode] There is no keyword called "or" in C++ its denoted by "||" | |
Re: 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 onto your start pointers array, instead of pointing it to an address of a local variable. … | |
Re: One thing, which may or may not be a problem, is this [icode] if (validAccount == false) { ..... switch(AccountType) { case 's': case 'S': .... validAccount = true; ... } } else cout << "You entered the wrong account type. Please check input file."; [/icode] Now the first time … | |
Re: A void function would generally look like this [icode] void foo(){ return; } [/icode] But trying to do this is wrong. [icode] void foo(){ int retvalue; return retvalue; }; [/icode] Moral, you cannot return values from a void function. Its incorrect, and a good compiler should throw an error if … | |
Re: Pass them in as pointers from your calling function. [icode] void fbExeCode(int BldCnt, char* fCodeAddr, char* tmpAddr){ } [/icode] A few things to be careful about. If you want to allocate them in fbExeCode, then initialize them to NULL to be safe. Also make sure you don't lose the starting … |