<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'tokenize method' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'tokenize method' posted on the 'C and C++' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 04:51:55 -0700</pubDate>
    <lastBuildDate>Sat, 25 May 2013 04:51:55 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>tokenize method</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/384768/384768/tokenize-method/</link>
      <description>This method takes two strings as input s1, a generic string, and s2 containing delimiters. s1 is verified against s2 and depending on the type of character it is stored in a two dimensional array. The problem that I have is I am not sure if the characters are stored correctly in the array, and how to arrange the delimiter characters in increasing order.&lt;br /&gt;
&lt;br /&gt;
#pragma once&lt;br /&gt;
&lt;br /&gt;
class Tokenizer&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	Tokenizer(void);&lt;br /&gt;
	~Tokenizer(void);&lt;br /&gt;
	void tokenize(char *s1, char *s2){&lt;br /&gt;
			for(int i=0; i&amp;lt;size of s1; i++){&lt;br /&gt;
			   for(int j=0; j&amp;lt;size of s2; j++){&lt;br /&gt;
			    	if(s1[i]==s2[j]){&lt;br /&gt;
				        s3[i]=s1[i];					&lt;br /&gt;
				}&lt;br /&gt;
				else{&lt;br /&gt;
					s3[k]=s1[i];&lt;br /&gt;
					k++;&lt;br /&gt;
				}&lt;br /&gt;
				break;					&lt;br /&gt;
			   }&lt;br /&gt;
		         }	&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
		while(i&amp;lt;sizeof s2){&lt;br /&gt;
			l.add(s2[i]);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	char * s1, * s2, * s3[][];&lt;br /&gt;
	LinkedList * l=new LinkedList();&lt;br /&gt;
	&lt;br /&gt;
};&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/384768/384768/tokenize-method/</guid>
      <pubDate>Fri, 23 Jan 2009 05:54:30 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Re: tokenize method</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/384768/384772/re-tokenize-method/#384772</link>
      <description>I don't quite understand what you want. The algorithm itself doesn't make any sense. And where are the strings allocated?&lt;br /&gt;
&lt;br /&gt;
char * s1, * s2, * s3[][];&lt;br /&gt;
&lt;br /&gt;
Why did you make two one-dimensional pointers and one three-dimensional?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: 	LinkedList * l=new LinkedList();&lt;br /&gt;
&lt;br /&gt;
This isn't valid C++, all initialization must be done in the constructor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: 		while(i&amp;lt;sizeof s2){&lt;br /&gt;
&lt;br /&gt;
This won't work, s2 is a pointer and not a statically allocated array.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/384768/384772/re-tokenize-method/#384772</guid>
      <pubDate>Fri, 23 Jan 2009 07:42:04 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Re: tokenize method</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/384768/384806/re-tokenize-method/#384806</link>
      <description>I was trying to separate between delimiters and string literals (sin, cos, tan) and store them in one string, but I am not sure if this is the exact requirement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/384768/384806/re-tokenize-method/#384806</guid>
      <pubDate>Sat, 24 Jan 2009 06:59:15 -0700</pubDate>
      <category>C and C++</category>
    </item>
  </channel>
</rss>