Search:

Type: Posts; User: campermama

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    887

    I did say in the main() function is where the...

    I did say in the main() function is where the problem is. I am getting a few errors. I altered the code some.......



    int main()
    {

    int getInput(int *input);

    int n = 0;
  2. Replies
    5
    Views
    887

    Missing something

    I think I have been working on this too long.....in the Main Function area I can't get this to work, I am sure it is probably something simple but I am not seeing it, are you???
    Thanks!!!!


    ...
  3. Replies
    8
    Views
    1,026

    Terve Nouneim, I am also new to programming,...

    Terve Nouneim,

    I am also new to programming, but I saw that you said you are Finnish, I work for a Finnish company and I have been to Finland many, many times. Just wanted to say hi. Hope you can...
  4. Replies
    3
    Views
    712

    How about, search the array and if the value is...

    How about, search the array and if the value is found return the location of the value, that is the value in position 1 or 6 or ?. How do I do that?
    Thanks!!
  5. Replies
    5
    Views
    1,047

    I think the problem was I was showing a result...

    I think the problem was I was showing a result for f(0) and that was not part of this recursive,


    f(1)=2, f(2)=2, f(n)=2*f(n-1) + f(n-2)

    So I changed my code to just show f(1), f(2), and...
  6. Replies
    5
    Views
    1,047

    Yes, I know....but I am not supposed to define...

    Yes, I know....but I am not supposed to define that many variables, just n>=1. Any ideas?
  7. Replies
    3
    Views
    712

    Ok, not sure how to do that. Would it be another...

    Ok, not sure how to do that. Would it be another if statement?
  8. Replies
    3
    Views
    712

    Need way to end

    I need a way for this recursive to end when the item is not in the list. Can you help? Thanks!!



    template <typename T>
    class List
    {
    private:
    T * array;//memory for array will be...
  9. Replies
    5
    Views
    1,047

    too many variables defined

    This is what I have:


    #include <iostream.h>

    //f(1)=2, f(2)=2, f(n)=2*f(n-1) + f(n-2)

    int f(int n)
    {
  10. Replies
    9
    Views
    963

    What can I replace these with?

    What can I replace these with?
  11. Replies
    9
    Views
    963

    I would rather change the program to work with my...

    I would rather change the program to work with my compiler, is this possible?
    Of course I would need help! :D
  12. Replies
    9
    Views
    963

    can't compile

    I am using Metrowerks Code Warrior, I had somebody helping me with this. It compiles on his compiler (not the same as mine) but I am getting like 99 errors! Can't open dos.h, and can't open...
  13. Replies
    1
    Views
    882

    Character strings

    Consider the language in the alphabet {a,b} defined by the grammar:



    <S> = a<S>a | b<S>b | a | b


    What are the 5 character strings in this language. Not sure what this means? Is it:
    aa...
  14. Replies
    1
    Views
    655

    Stuck again.

    Not sure if I am on the right track with the code below. This is what I need, I know I am missing stuff, just not sure how to put it in here!
    Write a recursive implementation, the operation should...
  15. Replies
    10
    Views
    927

    Yes it compiles fine but after you enter the...

    Yes it compiles fine but after you enter the string of characters etc. it goes into an infinite loop, I don't know why?
  16. Replies
    10
    Views
    927

    Stuck in a loop

    Can anybody see what is wrong with this? It gets stuck in a loop. I think I am too tired!! Thanks!



    #include <iostream.h>
    #include <string.h> //used for strlen

    bool InLanguage(char s[],...
  17. Replies
    1
    Views
    784

    More recursive, ugh!!

    Does the following recurrence relation = 50, am I doing this right?



    S(1)=5; S(N)=S(N-1) + 5 for N>1
  18. Replies
    1
    Views
    1,212

    correct order to insert new node?

    Would this be the correct order to insert a new node at P into a doubly linked list before the the node pointed to cur. Thanks!



    P->Next = Cur;
    P->Before = Cur->Before;
    P->Before->Next = P;...
  19. Replies
    6
    Views
    717

    I am just supposed to write a recursive function,...

    I am just supposed to write a recursive function, just not sure if this is "good" or not. If it was in a program would it work?
  20. Replies
    6
    Views
    717

    Recursive function

    I am still learning this. Does this look right?
    Thanks!!


    Void DoIt(int N) {
    if ( N > 0) {
    cout << N << " ";
    DoIt(N + 1);
    }
    }
  21. Replies
    7
    Views
    1,076

    Is this what you are looking for? Obviously I had...

    Is this what you are looking for? Obviously I had help with this!!



    #ifndef NEWSTRING_H
    #define NEWSTRING_H
    #include <list>
    #include <iostream>

    using namespace std;
  22. Replies
    7
    Views
    1,076

    Still trying to figure out how to show the length...

    Still trying to figure out how to show the length in case 4:
    In case 5: returns 1 (true) if string2 is a substring of string1 and 0 (false). How do I do an if with a substring?
    Does anybody know...
  23. Thread: Recursive

    by campermama
    Replies
    0
    Views
    588

    Recursive

    I need to make this a recursive implementation, I need a little help.
    Thanks!!



    void List::insert (int index, ListItemType newItem,
    bool& success)
    {
    ...
  24. Replies
    7
    Views
    1,076

    Case 4 and 5 weren' t there because I am trying...

    Case 4 and 5 weren' t there because I am trying to figure out how to do it. I have made an attempt at 4, but not sure how to show the length :confused:
    Case 5, I have no idea how to start that...
  25. Replies
    7
    Views
    1,076

    switch, case help

    In this code I got case, 1, 2, 3 in the switch, but I am having trouble with 4 and 5.



    #include <iostream>
    #include <list>
    #include <NewString.h> // NewString class definition

    using...
Results 1 to 25 of 40
Page 1 of 2 1 2