I've searched for a solution to my problem, and the posted ones don't seem to work. I am trying to run the following in Visual Studio 2012. I have previously used Eclipse for my programming, and am adjusting to the new IDE.
class
IntSLLNode{
public:
int info;
IntSLLNode *next;
IntSLLNode(){
next = 0;
}
IntSLLNode (int el, IntSLLNode *ptr= 0) {
info = el;
next = ptr;
}
};
int main(){
#include <iostream>
using namespace std;
IntSLLNode *p = new IntSLLNode(18);
cout << *p;
return;
}
When I try to run that, it gives me an error under cout. I have included iostream and the std namespace as I normally do. Is that not correct? Can anyone assist me in getting this to work, because I quite prefer the look of the Visual Studio IDE and would like to continue using it.