// Don't be afraid of whitespace. I added new lines to make the code look less cramped.
// It makes it easier to read and follow
#include <iostream> // <- the header is <iostream>, not <iostream.h>
#include <conio.h> // <- nonstandard header, but that's OK as long as your environment has it.
// Just know that not everyone's environment will have this header available.
usingnamespace std; // <- if you want to use 'cout' without the 'std::' prefix, you need
// to dump it into the global namespace
struct node{ char info;
node * next;
} ;
node *abc=new node;
//abc->info='k'; // <- you can't put executable code globally. It must go in a function.
int main() // <- main must return an int. Not a void.
{
abc->info = 'k'; // <- you can do this inside main.
clrscr();
cout<<abc->info<<" "<<abc->next; // <- abc->next will be garbage because you never
// initialized it.
getch();
delete abc; // <- anything you 'new' you must 'delete' or you get a memory leak.
}
In my TurboC4 compiler, header files don't get included without ".h".
There is compatibility issue between my computer and compiler as after sometime mouse pointer freezes and then i have to run all commands from keyboard only.
Please give me suitable link to download most suitable c compiler. my system is "Windows8 64 bit". I have tried almost all "Google search result".
Thank u!!
The compiler you are using is severely outdated and hasn't been updated in about a decade. Please, please, please switch to a modern compiler. Anything from the last few years will do.