Ok... so i am making a rather simple calculator, that solves for either derivatives or a polynomial.


Though I have to make my own linkedlist is the challenge.


Ok, I will just copy and paste the LinkedList.cpp file:

#include <stdlib.h>
#include <cstdlib>
#include <string>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>
#include "LinkedList.h"
#include "main.h"

using namespace std;




void LinkedList::add(string imissjava) {



temp = (node*)malloc(sizeof(node));



temp->data = imissjava;             // store data(first field)
temp->next=head;  // store the address of the pointer head(second field)
head = temp;
}

string LinkedList::get() {

    node *temp1 = NULL;
    temp1=head;

    while( temp1!=NULL )
{
 cout<< temp1->data<<" ";// show the data in the linked list

 temp1 = temp1->next;   // tranfer the address of 'temp->next' to 'temp'

}
}

And here is the header file for it(which I got help on, since I am noob at headerfiles, aka I started c++ like 2 weeks ago, but I know java good)

/*
 * File:   LinkedList.h
 * Author: JigglyWiggly
 *
 * Created on January 21, 2010, 8:02 PM
 */


#include <stdlib.h>
#include <cstdlib>
#include <string>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>
#include "main.h"
//#include "node.h"

using namespace std;

#ifndef _LINKEDLIST_H

#define	_LINKEDLIST_H

struct node{
        string data;
        node *next;        // Pointer to next node
    };

class LinkedList {
public:
    //put all the functions and variables here
    //void function(int);

    void add(string);
    
    string get();
    node *start_ptr;
    node *head;
    node *temp;
};






#endif	/* _LINKEDLIST_H */

Ok so, ignore most of the cost I am going to put, except the first 3 lines in the main:

#include <stdlib.h>
#include <cstdlib>
#include <string>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>
#include "LinkedList.h"
#include "main.h"


using namespace std;



//c::getmemorylocationnode();             //empty linked list




double holdingeval = 0;
string userinput = "no";
typedef bool boolean;
boolean istherex = true;
double whatisx = 0;
double d;
double e;

double evaluate(double x, double y, bool c) {
    holdingeval += ::pow(x, y);

    if (c == true) {
        holdingeval = ::pow(x, y) * whatisx;
    }
    return (holdingeval);

}

void printout() {

}


int main(int argc, char** argv) {
    LinkedList* sr = new LinkedList(); //These are the three lines I was talking about up above.
    string dis="hi";
    sr->add(dis);


    
    string userinputlocal;
    cout << "Would you like to solve for the derivative or the polynomial?" << endl;
    cin >> userinputlocal;

    string poly = "polynomial";
    string deriv = "derivative";

    if (userinputlocal == poly) {
        cout << "What is X" << endl;
        cin >> whatisx;


        while (userinput == "no") {

            cout << "Enter the first integer" << endl;
            cin >> d;



            cout << "Enter the exponent" << endl;

            string istherevar;
            cout << "Is there a variable in this part of the equation?" << endl;
            cin >> istherevar;

            if (istherevar == "yes") {
                istherex = true;
            } else if (istherevar == "no") {
                istherex = false;
            } else {
                cout << "Type yes or no" << endl;
                return 0;
            }

            holdingeval = holdingeval + ::evaluate(d, e, istherex);

            string overyet;

            cout << "Done...?" << endl;
            cin >> overyet;

            if (overyet == "yes") {
                cout << holdingeval << endl;
                return 0;
            }


        }

    }



    if (userinputlocal == deriv) {
        while (userinput == "no") {
            cout << "Enter the first integer" << endl;
            cin >> d;

            cout << "Enter the exponent" << endl;
            cin >> e;

            string vr;
            cout << "Is there a variable in this part of the equation?" << endl;
            cin >> vr;
            if (vr == "yes") {
                istherex = true;
            } else {
                istherex = false;
            }

            string wasd = "";
            cout << "Done?" << endl;
            cin >> wasd;

            if(wasd=="yes") {

                return 0;
            }

        }
    }





    return (EXIT_SUCCESS);
}

Running this (I am using netbeans with cygwin)

C:\Program Files (x86)\NetBeans 6.8\dlight2\bin\nativeexecution\dorun.sh: line 3
3:  4636 Segmentation fault      (core dumped) sh "${SHFILE}"
Press [Enter] to close the terminal ...

If I take those lines out saying

LinkedList* sr = new LinkedList();
    string dis="hi";
    sr->add(dis);

It works then, but I need to create a linkedlist.

Any help?

Also here is main.h file

/*
 * File:   main.h
 * Author: JigglyWiggly
 *
 * Created on January 21, 2010, 8:07 PM
 */

#include <stdlib.h>
#include <cstdlib>
#include <string>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>




#ifndef _MAIN_H
#define	_MAIN_H

double evaluate(double, double, bool);



#endif	/* _MAIN_H */

Unfortunately you don't show us the add() method itself. Does it make sure that the last pointer is not null? Does it create a head at the beginning if there's not one?

I beleive I did paste the add method, it's in LinkedList.cpp

void LinkedList::add(string imissjava) {



temp = (node*)malloc(sizeof(node));



temp->data = imissjava;             // store data(first field)
temp->next=head;  // store the address of the pointer head(second field)
head = temp;
}

Unfortunately you don't show us the add() method itself. Does it make sure that the last pointer is not null? Does it create a head at the beginning if there's not one?

He shows it at the beginning :

void LinkedList::add(string imissjava) {
  temp = (node*)malloc(sizeof(node));
  temp->data = imissjava;             // store data(first field)
  temp->next=head;  // store the address of the pointer head(second field)
  head = temp;
}

Ok, couple of things you should change here. First do not use
malloc in C++, use the operator new. Like so :

Node* temp = new Node(imissJava);

Second, you should append the node to the head, if its null,
else to the tail. So it should be something like so :

if head is null head equals new Node. Set head data to some value
else iterate until tail->next != null. Then set tail->next equal new 
Node. Set tail->next->data to some value;

In code it might look something like this :

if(head == NULL){
  head = new Node();
  head->data = someData;
 }
else
{
  Node * temp = head;
  while(temp->next != NULL)
        temp = temp->next;

  temp->next = new Node();
  temp->next->data = someData;
}

Usually its convenient to have a head node and a tail node
as a member variable.

Third, get rid of the temp member variable.
Fourth, I am sorry you miss java, get over it.

He shows it at the beginning :

Thanks fP. Not sure why I missed it, I went over the code like 3 times. :S

@OP I think he's covered it, so see where you can go from there.

Well thanks for the help, and fyi I was just joking around in my code, no need to take it so literally.

One more thing instead of malloc you said do this, I don't think this is correct

node* temp = new node(imissjava);

One more thing instead of malloc you said do this, I don't think this is correct

node* temp = new node(imissjava);

Well with that I was suggesting you create a constructor for your
node that takes that parameter and initializes the data. That way
you don't have to do temp->data = someData;

For example your definition for node is this :

struct node{
        string data;
        node *next;        // Pointer to next node
    };

What that code you have to do this :

node *temp = new node;
temp->data = someData;
temp->next = null;
head = temp;

What I suggested is that you do this :

struct node{
        string data;
        node *next;        // Pointer to next node
        node(const string& initData){
               data = initData;
               next = NULL;
       }
    };

That way all you have to do is this

node* temp = new node(someData);
head = temp;

You are correct. It will if you add a constructor to your node struct.

struct node{
     string data;
     node *next; // Pointer to next node
     node(string dat) : data(dat) {}
};

EDIT: fP remember when you kept getting beaten to the punch the other day, well I think it's my turn today. :)

>> EDIT: fP remember when you kept getting beaten to the punch the other day, well I think it's my turn today

I am sorry, that is all I have to say:)

Hmm, I didn't change much yet, because I just want to see if what my older code will work. It works for the most part, except the get method does not work. I mean it doesn't cause a compile error right away, only when it reaches the get statement.

Here is LinkedList.cpp

#include <stdlib.h>
#include <cstdlib>
#include <string>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>
#include "LinkedList.h"
#include "main.h"

using namespace std;




void LinkedList::add(string imissjava) {



    if(head == NULL){
  head = new node();
  head->data = imissjava;
 }
else
{
  node * temp = head;
  while(temp->next != NULL)
        temp = temp->next;

  temp->next = new node();
  temp->next->data = imissjava;
}

}

string LinkedList::get() {

  temp1=head;

    while( temp1!=NULL )
{
 cout<< temp1->data<<" ";// show the data in the linked list

 temp1 = temp1->next;   // tranfer the address of 'temp->next' to 'temp'

}

}

And the header file

/*
 * File:   LinkedList.h
 * Author: JigglyWiggly
 *
 * Created on January 21, 2010, 8:02 PM
 */


#include <stdlib.h>
#include <cstdlib>
#include <string>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>
#include "main.h"
//#include "node.h"

using namespace std;

#ifndef _LINKEDLIST_H

#define	_LINKEDLIST_H

struct node{
        string data;
        node *next;        // Pointer to next node

    };

class LinkedList {
public:
    //put all the functions and variables here
    //void function(int);

    void add(string);
    
    string get();
    node *start_ptr;
    node *head;
    node *temp;
    node *temp1;

};






#endif	/* _LINKEDLIST_H */

Also I will repost the main.cpp, look under when the user enters a polynomial and finishes it, is where I call the method get.


The error is quite strange here is the output log of it running

cygwin warning:
  MS-DOS style path detected: C:\Program Files (x86)\NetBeans 6.8\dlight2\bin\na
tiveexecution\dorun.sh
  Preferred POSIX equivalent is: /cygdrive/c/Program Files (x86)/NetBeans 6.8/dl
ight2/bin/nativeexecution/dorun.sh
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Would you like to solve for the derivative or the polynomial?
polynomial
What is X
3
Enter the first integer
2
Enter the exponent
Is there a variable in this part of the equation?
yes
hello
Done...?
yes
6
C:\Program Files (x86)\NetBeans 6.8\dlight2\bin\nativeexecution\dorun.sh: line 3
3:  2592 Segmentation fault      (core dumped) sh "${SHFILE}"
Press [Enter] to close the terminal ...

And here is main.cpp

#include <stdlib.h>
#include <cstdlib>
#include <string>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>
#include "LinkedList.h"
#include "main.h"
#include <sstream>


using namespace std;



LinkedList* storepoly = new LinkedList();
LinkedList* storederiv = new LinkedList();


double holdingeval = 0;
string userinput = "no";
typedef bool boolean;
boolean istherex = true;
double whatisx = 0;
double d;
double e;

double evaluate(double x, double y, bool c) {
    holdingeval += ::pow(x, y);

    if (c == true) {
        holdingeval = ::pow(x, y) * whatisx;
    }
    return (holdingeval);

}

void printout() {

}

int main(int argc, char** argv) {





    string userinputlocal;
    cout << "Would you like to solve for the derivative or the polynomial?" << endl;
    cin >> userinputlocal;

    string poly = "polynomial";
    string deriv = "derivative";

    if (userinputlocal == poly) {
        cout << "What is X" << endl;
        cin >> whatisx;


        while (userinput == "no") {

            cout << "Enter the first integer" << endl;
            cin >> d;



            cout << "Enter the exponent" << endl;

            string istherevar;
            cout << "Is there a variable in this part of the equation?" << endl;
            cin >> istherevar;

            if (istherevar == "yes") {
                cout << "hello" << endl;
                istherex = true;

                std::ostringstream strs;
                strs << d;
                std::string str = strs.str();

                strs << e;
                std::string str2 = strs.str();

                strs << whatisx;
                std::string str3 = strs.str();


                storepoly->add(str + "x" + "^" + str2 + "*" + str3+ "+");



            } else if (istherevar == "no") {
                std::ostringstream strs;
                strs << d;
                std::string str = strs.str();

                strs << e;
                std::string str2 = strs.str();

                storepoly->add(str + "^" + str2 + "+");
                istherex = false;
            } else {
                cout << "Type yes or no" << endl;
                return 0;
            }

            holdingeval = holdingeval + ::evaluate(d, e, istherex);

            string overyet;

            cout << "Done...?" << endl;
            cin >> overyet;

            if (overyet == "yes") {
                cout << holdingeval << endl;

                storepoly->get(); //error here, basically anywhere where the get method iscalled.
                return 0;
            }


        }

    }



    if (userinputlocal == deriv) {
        while (userinput == "no") {
            cout << "Enter the first integer" << endl;
            cin >> d;

            cout << "Enter the exponent" << endl;
            cin >> e;

            string vr;
            cout << "Is there a variable in this part of the equation?" << endl;
            cin >> vr;
            if (vr == "yes") {

                if (e != 0) {
                    e = e - 1;
                }


                std::ostringstream strs;
                strs << d;
                std::string str = strs.str();

                strs << e;
                std::string str2 = strs.str();

                string temperx = "x";

                storederiv->add(str + "*" + temperx + "^" + str2 + "+");



            } else {
                istherex = false;


                storederiv->add("0 + ");
              
            }


            string overyet;

            cout << "Done...?" << endl;
            cin >> overyet;

            if (overyet == "yes") {
               storederiv->get();  //error here, basically anywhere where the get method iscalled.
                return 0;
            }

        }
    }





    return (EXIT_SUCCESS);
}

Is this the get method you are talking about :

string LinkedList::get() 
{
  temp1=head; 
  while( temp1!=NULL ){
      cout<< temp1->data<<" ";// show the data in the linked list 
      temp1 = temp1->next;   // tranfer the address of 'temp->next' to 'temp' 
   }
 }

There is a problem with that. You declared it as returning a string,
and you don't return anything. And why is it called get? Call
it printAll() or something since thats what its doing.

I am an idiot, you are awesome thanks a bunch :)

One tiny problem, when the user types derivative and says "no" to whether there is an x or not, it crashes at the storederiv->get();
It also crashes on the derivative one if there is two or more with "yes" to whether there is an x or not.

The polynomial one works fine, but I even copied and pasted the polynomial one and changed the derivative one again...

I am not sure what is going on here, here is the changed main a bit.

#include <stdlib.h>
#include <cstdlib>
#include <string>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>
#include "LinkedList.h"
#include "main.h"
#include <sstream>


using namespace std;



LinkedList* storepoly = new LinkedList();
LinkedList* storederiv = new LinkedList();


double holdingeval = 0;
string userinput = "no";
typedef bool boolean;
boolean istherex = true;
double whatisx = 0;
double d;
double e;

double evaluate(double x, double y, bool c) {
    holdingeval += ::pow(x, y);

    if (c == true) {
        holdingeval = ::pow(x, y) * whatisx;
    }
    return (holdingeval);

}

void printout() {

}

int main(int argc, char** argv) {





    string userinputlocal;
    cout << "Would you like to solve for the derivative or the polynomial?" << endl;
    cin >> userinputlocal;

    string poly = "polynomial";
    string deriv = "derivative";

    if (userinputlocal == poly) {
        cout << "What is X" << endl;
        cin >> whatisx;


        while (userinput == "no") {

            cout << "Enter the first integer" << endl;
            cin >> d;

            cout << "Enter the exponent" << endl;
            cin >> e;

            string istherevar;
            cout << "Is there a variable in this part of the equation?" << endl;
            cin >> istherevar;

            if (istherevar == "yes") {
                istherex = true;

                std::ostringstream strs;
                strs << d;
                std::string str = strs.str();

                std::ostringstream strs2;
                strs2 << e;
                std::string str2 = strs2.str();

                std::ostringstream strs3;
                strs3 << whatisx;
                std::string str3 = strs3.str();


                storepoly->add(str + "x" + "^" + "(" + str2 + ")" + "+");



            } else if (istherevar == "no") {
                std::ostringstream strs;
                strs << d;
                std::string str = strs.str();

                std::ostringstream strs3;
                strs3 << e;
                std::string str2 = strs3.str();

                storepoly->add(str + "^" + "(" + str2 + ")" + "+");
                istherex = false;
            } else {
                cout << "Type yes or no" << endl;
                return 0;
            }

            holdingeval = holdingeval + ::evaluate(d, e, istherex);

            string overyet;

            cout << "Done...?" << endl;
            cin >> overyet;

            if (overyet == "yes") {
                cout << holdingeval << endl;

                storepoly->get();
                return 0;
            }


        }

    }



    if (userinputlocal == deriv) {
        while (userinput == "no") {


            cout << "Enter the first integer" << endl;
            cin >> d;

            cout << "Enter the exponent" << endl;
            cin >> e;

            string istherevar;
            cout << "Is there a variable in this part of the equation?" << endl;
            cin >> istherevar;

            if (istherevar == "yes") {
                istherex = true;

                std::ostringstream strs;
                strs << d;
                std::string str = strs.str();

                std::ostringstream strs2;
                strs2 << e;
                std::string str2 = strs2.str();

                std::ostringstream strs3;
                strs3 << whatisx;
                std::string str3 = strs3.str();


                storederiv->add(str + "*" + "x" + "^" + "(" + str2 + ")" + "+");



            } else if (istherevar == "no") {

                storederiv->add("0");

                istherex = false;
            } else {
                cout << "Type yes or no" << endl;
                return 0;
            }

             string overyet;

            cout << "Done...?" << endl;
            cin >> overyet;

            if (overyet == "yes") {
               
                storederiv->get();
                return 0;
            }



        }
    }





    return (EXIT_SUCCESS);
}

Here is the output

Would you like to solve for the derivative or the polynomial?
derivative
Enter the first integer
3
Enter the exponent
2
Is there a variable in this part of the equation?
no
Done...?
yes
C:\Program Files (x86)\NetBeans 6.8\dlight2\bin\nativeexecution\dorun.sh: line 3
3:  6456 Segmentation fault      (core dumped) sh "${SHFILE}"
Press [Enter] to close the terminal ...

Oh and if I try to build it on visual studio 2010 beta, I think I put it in right in visual studio but I can't even build it:

1>------ Build started: Project: calcstackdriver, Configuration: Debug Win32 ------
1>Build started 1/24/2010 3:18:38 AM.
1>_PrepareForBuild:
1>  Touching "Debug\calcstackdriver.unsuccessfulbuild".
1>ClCompile:
1>  All outputs are up-to-date.
1>  calcstackdriver.cpp
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(1): warning C4627: '#include <stdlib.h>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(2): warning C4627: '#include <cstdlib>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(3): warning C4627: '#include <string>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(4): warning C4627: '#include <cstdlib>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(5): warning C4627: '#include <iostream>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(6): warning C4627: '#include <algorithm>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(7): warning C4627: '#include <cmath>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(8): warning C4627: '#include "LinkedList.h"': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(9): warning C4627: '#include "main.h"': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(10): warning C4627: '#include <sstream>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(17): error C2143: syntax error : missing ';' before '*'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(17): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(17): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(17): error C2061: syntax error : identifier 'LinkedList'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(18): error C2143: syntax error : missing ';' before '*'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(18): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(18): error C2086: 'int LinkedList' : redefinition
1>          c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(17) : see declaration of 'LinkedList'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(18): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(18): error C2061: syntax error : identifier 'LinkedList'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(22): error C2146: syntax error : missing ';' before identifier 'userinput'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(22): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(22): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(22): error C2440: 'initializing' : cannot convert from 'const char [3]' to 'int'
1>          There is no context in which this conversion is possible
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(30): error C2039: 'pow' : is not a member of '`global namespace''
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(30): error C3861: 'pow': identifier not found
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(33): error C2039: 'pow' : is not a member of '`global namespace''
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(33): error C3861: 'pow': identifier not found
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(49): error C2146: syntax error : missing ';' before identifier 'userinputlocal'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(49): error C2065: 'userinputlocal' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(50): error C2065: 'cout' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(50): error C2065: 'endl' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(51): error C2065: 'cin' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(51): error C2065: 'userinputlocal' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(53): error C2146: syntax error : missing ';' before identifier 'poly'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(53): error C2065: 'poly' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(54): error C2146: syntax error : missing ';' before identifier 'deriv'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(54): error C2065: 'deriv' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(56): error C2065: 'userinputlocal' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(56): error C2065: 'poly' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(57): error C2065: 'cout' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(57): error C2065: 'endl' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(58): error C2065: 'cin' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(61): error C2446: '==' : no conversion from 'const char *' to 'int'
1>          There is no context in which this conversion is possible
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(61): error C2040: '==' : 'int' differs in levels of indirection from 'const char [3]'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(63): error C2065: 'cout' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(63): error C2065: 'endl' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(64): error C2065: 'cin' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(66): error C2065: 'cout' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(66): error C2065: 'endl' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(67): error C2065: 'cin' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(69): error C2146: syntax error : missing ';' before identifier 'istherevar'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(69): error C2065: 'istherevar' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(70): error C2065: 'cout' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(70): error C2065: 'endl' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(71): error C2065: 'cin' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(71): error C2065: 'istherevar' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(73): error C2065: 'istherevar' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(76): error C2039: 'ostringstream' : is not a member of 'std'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(76): error C2065: 'ostringstream' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(76): error C2146: syntax error : missing ';' before identifier 'strs'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(76): error C2065: 'strs' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(77): error C2065: 'strs' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(78): error C2039: 'string' : is not a member of 'std'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(78): error C2146: syntax error : missing ';' before identifier 'str'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(78): error C2065: 'str' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(78): error C2065: 'strs' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(78): error C2228: left of '.str' must have class/struct/union
1>          type is ''unknown-type''
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(80): error C2039: 'ostringstream' : is not a member of 'std'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(80): error C2065: 'ostringstream' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(80): error C2146: syntax error : missing ';' before identifier 'strs2'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(80): error C2065: 'strs2' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(81): error C2065: 'strs2' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(82): error C2039: 'string' : is not a member of 'std'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(82): error C2146: syntax error : missing ';' before identifier 'str2'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(82): error C2065: 'str2' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(82): error C2065: 'strs2' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(82): error C2228: left of '.str' must have class/struct/union
1>          type is ''unknown-type''
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(84): error C2039: 'ostringstream' : is not a member of 'std'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(84): error C2065: 'ostringstream' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(84): error C2146: syntax error : missing ';' before identifier 'strs3'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(84): error C2065: 'strs3' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(85): error C2065: 'strs3' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(86): error C2039: 'string' : is not a member of 'std'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(86): error C2146: syntax error : missing ';' before identifier 'str3'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(86): error C2065: 'str3' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(86): error C2065: 'strs3' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(86): error C2228: left of '.str' must have class/struct/union
1>          type is ''unknown-type''
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(89): error C2227: left of '->add' must point to class/struct/union/generic type
1>          type is 'int *'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(89): error C2065: 'str2' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(93): error C2065: 'istherevar' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(94): error C2039: 'ostringstream' : is not a member of 'std'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(94): error C2065: 'ostringstream' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(94): error C2146: syntax error : missing ';' before identifier 'strs'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(94): error C2065: 'strs' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(95): error C2065: 'strs' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(96): error C2039: 'string' : is not a member of 'std'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(96): error C2146: syntax error : missing ';' before identifier 'str'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(96): error C2065: 'strs' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(96): error C2228: left of '.str' must have class/struct/union
1>          type is ''unknown-type''
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(98): error C2039: 'ostringstream' : is not a member of 'std'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(98): error C2065: 'ostringstream' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(98): error C2146: syntax error : missing ';' before identifier 'strs3'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(98): error C2065: 'strs3' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(99): error C2065: 'strs3' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(100): error C2039: 'string' : is not a member of 'std'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(100): error C2146: syntax error : missing ';' before identifier 'str2'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(100): error C2065: 'str2' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(100): error C2065: 'strs3' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(100): error C2228: left of '.str' must have class/struct/union
1>          type is ''unknown-type''
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(102): error C2227: left of '->add' must point to class/struct/union/generic type
1>          type is 'int *'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(102): error C2065: 'str2' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(105): error C2065: 'cout' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(105): error C2065: 'endl' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(111): error C2146: syntax error : missing ';' before identifier 'overyet'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(111): error C2065: 'overyet' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(113): error C2065: 'cout' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(113): error C2065: 'endl' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(113): fatal error C1003: error count exceeds 100; stopping compilation
1>  LinkedList.cpp
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(1): warning C4627: '#include <stdlib.h>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(2): warning C4627: '#include <cstdlib>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(3): warning C4627: '#include <string>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(4): warning C4627: '#include <cstdlib>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(5): warning C4627: '#include <iostream>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(6): warning C4627: '#include <algorithm>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(7): warning C4627: '#include <cmath>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(8): warning C4627: '#include "LinkedList.h"': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(9): warning C4627: '#include "main.h"': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(17): error C2653: 'LinkedList' : is not a class or namespace name
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(17): error C2065: 'string' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(17): error C2146: syntax error : missing ')' before identifier 'imissjava'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(17): error C2182: 'add' : illegal use of type 'void'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(17): error C2059: syntax error : ')'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(17): error C2143: syntax error : missing ';' before '{'
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(17): error C2447: '{' : missing function header (old-style formal list?)
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(37): error C2653: 'LinkedList' : is not a class or namespace name
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(39): error C2065: 'temp1' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(39): error C2065: 'head' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(41): error C2065: 'temp1' : undeclared identifier
1>c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\linkedlist.cpp(41): fatal error C1903: unable to recover from previous error(s); stopping compilation
1>  Generating Code...
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.12
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Oh wait polynomial has the same problem when I enter too many things...

Hmm I changed LinkedList.cpp

the get to see if I could diagnose what was wrong,

#include <stdlib.h>
#include <cstdlib>
#include <string>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>
#include "LinkedList.h"
#include "main.h"

using namespace std;




void LinkedList::add(string imissjava) {



    if(head == NULL){
  head = new node();
  head->data = imissjava;
 }
else
{
  node * temp = head;
  while(temp->next != NULL)
        temp = temp->next;

  temp->next = new node();
  temp->next->data = imissjava;
}

}

void LinkedList::get() {
    
  temp1=head;

    while( temp1!=NULL )
{
        cout << "hi" << endl;
        cout <<  temp1 << endl;
 cout << temp1->data<<" ";// show the data in the linked list

 temp1 = temp1->next;   // tranfer the address of 'temp->next' to 'temp'

}

}

When I run it:

Would you like to solve for the derivative or the polynomial?
derivative
Enter the first integer
3
Enter the exponent
2
Is there a variable in this part of the equation?
no
Done...?
yes
hi
0xd10470
 hi
0x1
C:\Program Files (x86)\NetBeans 6.8\dlight2\bin\nativeexecution\dorun.sh: line
3:  6568 Segmentation fault      (core dumped) sh "${SHFILE}"
Press [Enter] to close the terminal ...

It does the whole loop twice, but something seems fishy with 0x1? I have no idea.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.