- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
16 Posted Topics
Re: hmm that sounds more like a class assignment... anyways, why doesn't the code work on netbeans? are you getting a compiler error? | |
Re: This is just a guess, but I think you may have a logic error in that if you are looking for the largest prime factor you should do the upper half of the possible factors. You are decrementing from sqrt(bignum) to 2. You should be decrementing from bignum to sqrt(bignum). | |
Hi I using gcc on a .S file to assemble my program. [CODE] #include <string.h> .text .global defaultBSTNode defaultBSTNode: pushl %ebp movl %esp, %ebp addl $last_local, %esp #//void * memset ( void * ptr, int value, size_t num ); pushl $bst_size pushl $0 pushl retValuePtr(%ebp) call memset addl $12, %esp … | |
I am having problems accessing the members of the base class in my derived class. Is there anything wrong with the way I defined my base class as in: template <class T> class Stack : private Llist<T> Is there anything wrong with that? I am getting errors from gcc in … | |
[CODE] template <class T> class Llist //.... //Iterates to position and sets pointers to node at position-1 and position. template <class T> void LList<T>::iterate(Node<T>*& previous, Node<T>*& next, unsigned short pos) { //some code } //Start Iterator template <class T> inline Iterator<T> LList<T>::start() { //some code } template <class T> class … | |
![]() | Re: I'm amazed at how much more difficult you made this for yourself, hopefully if you apply this much effort to studying you can improve your skills. Something like this pseudocode, array[600] for array element 0 3 6, element = [ for array element 2 5 8, element = ] get … |
Re: Someone correct me if I am wrong but if you implement a C-style struct(POD struct) you won't have a constructor. So you will get some increase in efficiency if you don't need a constructor. | |
Re: You are using your variable declarations like a macro. The reason your result is not coming out correctly is because "division" is set equal to the value of d1 and d2 at the begging of your program, which is just garbage data. Maybe you should use a c macro if … | |
Name: Jade Height: 5'10'' Hair: green Eyes: purple Location: CA (originally from LA, the state) Age: 27 Hobbies: computer, meditation, fun Relationship Status: single Fav Music: metal, punk, lounge, acid-jazz Education: junior BS in CSC at UC Davis Work: Math Tutor Favorite TV Shows: XFiles | |
Right now I am using gdb on command line in Ubuntu. It seems pretty inefficient and cumbersome. Is that just because of the learning curve or because it is really that way? Do "real" c++ programmers use gdb? I felt the same way about vi until I learned to use … | |
Re: You should do an increment and a decrement in the same loop. | |
Re: You would use pointers or references for two reasons: 1. You want to modify the actual parameter inside the function. 2. You want to avoid pass by copy to conserve resources when passing something big. If you are doing it for the second reason and not the first, then pass … | |
Re: wrap your code in code tags. also your class and functions should have a template header above it template <class T> class myClass { T myMember; } template <class T> T myClass<T>::getSomething(){return myMember;} something like that You can use T as a class type if you don't know it beforehand. | |
This is giving me a segmentation fault in the noBucket() function. I don't see why. Does it having something to do with it being a const function? My other accessor functions are working fine and they are declared exactly the same with just a different name. The files are longer … |
The End.