- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
12 Posted Topics
[QUOTE=coldkiller;1058789]I am working on a equation balancer for my 12th class computer science project.But somehow i am not able to balance the chemical equation.Please if anyone can provide me the source code it will be a great help.Urgently needed![/QUOTE] How far have you gotten on your own? Can I see …
A For loop would be a bad idea here, I think do while is probably good for the situation. I'd like to help, but I don't fully understand what you want to do with question 1. What exactly is this supposed to do?
Well, Btrees can have more than two paths spanning from each node, so I think you could generally use your AVL tree, and do some modifications to it. Why not do some reading on how to balance your Btree [URL="http://en.wikipedia.org/wiki/Btree"]http://en.wikipedia.org/wiki/Btree[/URL]
I would like to make a link that will open up destination 1 in a target, and another destination in another target. It's pretty simple when doing one. <a href="home.html" target="target1"> home</a>
So I pretty much finished a memory management simulator, and it worked for the test cases my professor gave me, but when I added a test case it didn't work as it should have. The main issue is, the first job will start, and finish, but the wait time wont …
Your cpp worked with my small driver that I made [CODE]#include <string> #include "LinkedList.h" using namespace std; int main(){ LinkedList<int> intlist; intlist.insert(0); intlist.insert(1); intlist.insert(2); intlist.insert(3); int dummy; if(intlist.first(dummy)){ cout<<dummy; } if(intlist.getNext(dummy)){ cout<<dummy; } if(intlist.getNext(dummy)){ cout<<dummy; } if(intlist.getNext(dummy)){ cout<<dummy; } cin>>dummy; return 0; }[/CODE] However, I modified your .h to be …
Add this line to your declarations area: using namespace std; if you do that it works, and i think you should also get rid of all of the “std::” in your code。 this is what my program would look like if i were to write that program: [CODE] #include <iostream> …
Your percolateDown function should have <, not <= in both the while question and the if question。。。。 [CODE] void percolateDown(vector < int > &tree, int root, int wall) { int child; while ((2 * root + 1) < wall) { child = 2 * root + 1; if (child + …
I'd try a for loop。 [CODE] int main() { cout<<"Enter series of integers :"; int integer; cin>>integer; 。。。。。。。 [/CODE] This is definitly a step in the right direction, you just need to use integer to know how many times to go through your loop that asks for input。
[QUOTE=Doughnuts;1057737]I have displayed failbit, and it's value is 4. Why does failbit evaluate to true?[/QUOTE] To answer just this question, an integer is always true unless it is zero。 I don't know if that helps though。 I'm going to do some studying of your code to fully understand it。
[CODE] //////////////////////// /////counter.h file///// //////////////////////// #ifndef _COUNTER_H #define _COUNTER_H class Counter{ private: int counter; int limit; static int nCounters; public: Counter(int arg, int arg); void increment(); void decrement(); int getValue(); static int getNCounters(); }; #include "counter.cpp" #endif ////////////////////////// /////counter.cpp file///// ////////////////////////// #include <string> #include "counter.h" Counter::Counter(int a, int b){ counter=a; …
I believe the reason you can't see the function in the pt.h file is because only the prototypes are stored in the .h file, where as the definition is in the .cpp file.
The End.
bamcclur