i am getting one error when i try and compile this code, its in the last line when i try to output the date in the top node. anyone know why this is an error?
#include <iostream.h>
#include <fstream.h>
#include <string>
using namespace std;
struct StackFrame
{
string data;
StackFrame *link;
};
typedef StackFrame* StackFramePtr;
void main()
{
char array[1][5];
array[0][0] = 'h';
array[0][1] = 'e';
array[0][2] = 'l';
array[0][3] = 'l';
array[0][4] = 'o';
StackFramePtr top;
top = new StackFrame;
top->data = array[0];
top->link = NULL;
cout << top->data;
}



LinkBack URL
About LinkBacks


