Search:

Type: Posts; User: aciarlillo

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    2,166

    Really hard recursion with boxes, help?

    The problem is to use recursion to count how many boxes are in a room. The trick is each box can have boxes inside of it and each one of those can have even more inside of it. It is supposed to begin...
  2. Quick Q - using cstlib 'list' with types that contain virtual functions

    Hi, I'm trying to instantiate a list using the stl and I want to instantiate the list as pointers of a parent class Transport. Transport however has abstract virtual functions and my compiler is...
  3. Replies
    4
    Views
    3,587

    ummm nevermind im an idiot, its late and i forgot...

    ummm nevermind im an idiot, its late and i forgot my namespace :rolleyes:
  4. Replies
    4
    Views
    3,587

    istream and ostream not declared?

    My program keeps saying istream and ostream are not declared when I'm trying to create this class:



    #include <iostream>


    #ifndef TRANSPORT_H_
    #define TRANSPORT_H_
  5. alright yea i understand that my teacher just...

    alright yea i understand that my teacher just gave it to us as a diff name i guess. I still don't understand where I need the constructor or how to create the grandchild classes. Here is what I have...
  6. include guards?

    include guards?
  7. here is my transport.h #include ...

    here is my transport.h


    #include <iostream>
    #include <fstream>

    class Transport{
    public:
    virtual void output() = 0;
    virtual void input() = 0;
  8. Syntax trouble with class inheriting "redefinition of class.."?

    Hi, I'm working on a basic program to practice working with inherited classes, parent - child and grandchild. The problem is the book for my class is awful and any examples I find online are far to...
  9. anyone?

    anyone?
  10. rear_remove from double linked list causing segfault

    Okay I am creating a doubly linked list with simple functions for head insert, tail insert, head remove, tail remove and a few others. head insert and remove seem to be working fine and the tail...
  11. Replies
    4
    Views
    3,904

    okay still looking for some help on this... i am...

    okay still looking for some help on this... i am getting the above two errors on these two lines of code:



    temp->next = head;
    head->prev = temp;


    those two lines are from a function which...
  12. Replies
    4
    Views
    3,904

    i keep getting this error in my code: 67...

    i keep getting this error in my code:

    67 C:\Dev-Cpp\240c1\Dlist.template invalid use of member (did you forget the `&' ?)
    68 C:\Dev-Cpp\240c1\Dlist.template invalid use of member (did you forget...
  13. Replies
    4
    Views
    3,904

    Cant head insert on doubly linked list

    Okay, this is my first time working with doubly linked lists and I can't get past the first thing... doing a head insert.

    here is my code for the insert:


    template <class T>
    void...
  14. ideas on how to make this not use 99% system resources?

    Okay this is my code and its pretty simple and self-explainatory. The problem is that this program must be running in the background at all times so I don't want it to use all my CPU power. I know...
  15. Replies
    2
    Views
    1,024

    Easiest way to cut off net access?

    Okay my parents asked me if it would be possible to write a program that can limit the time frame during which the internet can be accessed from my sisters computers. I haven't done any type of real...
  16. Replies
    1
    Views
    2,058

    Odd problem in main(), code won't proceed

    I am writing a really basic program to mimick Sets using linked lists. I just made a small main() to test each of my template functions as I write them. The problem is my main is behaving very oddly...
  17. so the new code would look like this: ...

    so the new code would look like this:


    template <class T>
    class node{

    public:
    node<T>(){linkfield = NULL;}
    node<T>(T d, node<T> *lf){datafield = d; linkfield = lf;}
  18. yea that isnt the problem, i used the same node.h...

    yea that isnt the problem, i used the same node.h in another project and declared nodes the same way except instead of <T> i used other objects I had made like <Resident> and it worked fine. Any...
  19. it is still saying 'ISO C++ forbids declaration...

    it is still saying 'ISO C++ forbids declaration of node with no type' , 'expected ; before < token' for this line in set.h:


    node <T> * head;

    any ideas?
  20. Here us set.template which isnt done yet, I was...

    Here us set.template which isnt done yet, I was just trying to see if my constructors and such worked before moving on. Using g++ compiler/minGW with dev-cpp. The end result will be compiled with g++...
  21. help with template class using a template node

    I have a template node class that I have been using in some projects for creating linked lists with. Now I am trying to create a template class for working with sets. For some reason tho when I try...
  22. More linked list trouble

    I'm having some more trouble with this linked list stuff... my new problem is that my removeDirty() and removeClean() functions only remove nodes that are at the top of the list, not in the middle. I...
  23. Alright I got it, I had never returned something...

    Alright I got it, I had never returned something by reference but I figured it out, thanks
  24. trying to set data for a node class, not working?

    Okay I have an object called Resident and it has fields for name and bill. In my program I am going thru a linked list of dirty laundry items and when i get each item I am trying to adjust the owner...
  25. seg-faulting w/linked list but dont know why

    For some reason when doing anything with my linked lists I am getting a seg-fault. All of my linked list functions check to see if the head is NULL before adding or doing anything in the list to...
Results 1 to 25 of 29
Page 1 of 2 1 2