hey fellas:

been workin all day and am fried out now, so here is my last post for the nite.. i've got the first part of my input file parsed the right way, just have to figure out how to 'loop' the last part to get an unkown amount of data off a line.. the input file is like follows:

Abracadabra : Bas C D F 
B : A D E G
C : A D F
D : A B C E F G
E : B D G
F : A C D G
Greddy : Bust D E F
each is a string and must be parsed with the source before the colon and the adjacent verticies after the colon.. my function is as follows
Graph::Graph(string fileName) {
cout<<" Building Graph "<<endl;
	ifstream in(fileName.c_str());//converts it back to a useable format
	char buf[BUF_SIZE];

	if (!in)
	 cerr << "File Not Found \"" << fileName << "\" !!" << endl;
	 cerr << "Exiting........." << endl;
	while(in.getline(buf,BUF_SIZE) && !in.eof() && in.good()){
	int flag=0;
	int y=0;
	char source[BUF_SIZE];
	char dest[BUF_SIZE];
	//cout<<"BUF STRING LENGTH "<<strlen(buf);
	for ( int i =0; i < (strlen(buf)-1) ; i++)
		source[i]=buf[i];//build source string for my adj list
		if(buf[i]== ' ' && flag==0){//and the and flag here later...
		}//closes the IF and sets the flag now all verticies read will be non-source
		} //closes for loop
		cout<<"This is the source "<<source<<endl;
		cout<<"And this is its string length "<<strlen(source)<<endl;
		//		do{
		for(int j=strlen(source)+3;j<(strlen(buf)-1);j++){//opens a cross fin for
		if(buf[j]== ' '){
		}//closes if white space
		}//closes cross fin for loop
		//		}while(temp-(strlen(dest)-1) != 0);
		cout<<"This is " <<source<<"'s dest "<<dest<<endl;
		cout<<"And this is its string length "<<strlen(dest)<<endl;

			}//closes while loop
}//closes GRAPH function
the problem is that i only catch the first adjacent verticy.. that is only the first string after the colon.. i'm trying to figure out how to make it loop until the string "buf" is gone, but can't quite pin point how... thanks if anyone has a good suggestion.. i thought about subtracting the strlen(buf) of strlen(dest) but that didn't work out as you can see from my failed while loop.. thanks