All pastes #1275529 Raw Edit

Untitled

public text v1 · immutable
#1275529 ·published 2008-12-04 03:30 UTC
rendered paste body
unsigned int n = 0, cur = 0; //current locations
char tok = '.'; //token
char* text = "my magic. tex.t"; //text
char** final; //tokenized text
for (int i = 0; text[i] != '\0'; i++)
{
	final[cur][n] = text[i];
	n++;
	if (text[i] == tok)
	{
		cur++;
		n=0;
	}
}
printf("1: %s 2: %s 3: %s", final[0][], final[1][], final[2][]);