All pastes #139378 Raw Edit

Something

public text v1 · immutable
#139378 ·published 2006-08-19 22:37 UTC
rendered paste body
#include <iostream>
#include <string>

using namespace std;

int optimizacija(string s, string &t);

int _tmain(int argc, char * argv[])
{
	string s = "<><";
    string opt;
	//optimizacija(s,opt);
	cout << opt; // don't work 
	cout << "hello" << endl; // don't work
	cin.get();
	return 0;
}

int optimizacija(string s, string &t)
{
	int i=0, j=0;
	char c;
    t = "";
	while (i < s.size())
	{
		c = s[i];
	    j=i;
		while (s[i] == s[++j])
        i = j;
        t += s[i];
		i++;
	}
    return 0;