All pastes #1275534 Raw Edit

Untitled

public text v1 · immutable
#1275534 ·published 2008-12-04 03:34 UTC
rendered paste body
#include "stdio.h"
#include "stdlib.h"
int main(void)
{
	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][]);
	system("pause");
	return 0;
}