
-----------------------------------
unoho
Wed Jan 19, 2011 5:55 pm

structure and pointers help
-----------------------------------
okay ..so im new to C++. i do have 4 months of experience with C..
so the problem is everytime i try to run it, it outputs error saying the program has stopped working..windows is looking for solution.
any idea what i could be doing wrong?


[code]
#include 
#include 
#include 
#include 
using namespace std;

struct myStruct{
	int val;
	myStruct *next;
};

void print(myStruct *p1, myStruct *p2){
	assert (p1 && p2);
	
	if(p1->val < p2->val){
		cout val 