Can anyone explain to me why this code is not working?
Code:
#include <iostream>
using namespace std;
class linkedListclass {
public:
void code(int length) {
x=length;
if (x !=4)
cout << "The code is short" << endl;
else
cout << " goooood you got it" << endl;
}
/* void printlist() {
cout << "current node is " << dvalue << endl;
if (next != NULL)
next->printlist();
else
cout << "\n\n";
}*/
private:
int x;
};
int main() {
int newvalue
int length;
cout << "Insert a code of 12 characters:";
cin >> newvalue;
length = newvalue.length();
linkedListclass first;
first= new linkedListclass(length);
/* cout << "The value is " << first->getdvalue() << endl;
first->addbehind(45);
first->printlist();
first->addinfront(10);
first->printlist();*/
return 0;
}