<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=4&amp;t=11245&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2015-03-31T22:59:11+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=11245&amp;mode</id>
<entry>
<author><name><![CDATA[afrikanerhart]]></name></author>
<updated>2015-03-31T22:59:11+01:00</updated>
<published>2015-03-31T22:59:11+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=11245&amp;p=125236#p125236</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=11245&amp;p=125236#p125236"/>
<title type="html"><![CDATA[dziwny zapis z wykorzystaniem przypisania do wskaźnika]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=11245&amp;p=125236#p125236"><![CDATA[
Znalazłem taką oto funkcję <br /><br />[syntax=c]/**<br /> * C++ version 0.4 char* style &quot;itoa&quot;:<br />* Written by Lukás Chmela<br />* Released under GPLv3.<br />*/<br />char* itoa(int value, char* result, int base) {<br />// check that the base if valid<br />if (base &lt; 2 || base &gt; 36) { *result = '\0'; return result; }<br /><br />char* ptr = result, *ptr1 = result, tmp_char;<br />int tmp_value;<br /><br />do {<br />tmp_value = value;<br />value /= base;<br />*ptr++ = &quot;zyxwvutsrqponmlkjihgfedcba9876543210123456789abcdefghijklmnopqrstuvwxyz&quot; &#91;35 + (tmp_value - value * base)&#93;;<br />} while ( value );<br /><br />// Apply negative sign<br />if (tmp_value &lt; 0) *ptr++ = '-';<br />*ptr-- = '\0';<br />while(ptr1 &lt; ptr) {<br />tmp_char = *ptr;<br />*ptr--= *ptr1;<br />*ptr1++ = tmp_char;<br />}<br />return result;<br />}[/syntax]<br /><br />Nie rozumiem jakie jest znaczenie tej linijki <br />[syntax=c]*ptr++ = &quot;zyxwvutsrqponmlkjihgfedcba9876543210123456789abcdefghijklmnopqrstuvwxyz&quot; &#91;35 + (tmp_value - value * base)&#93;;[/syntax]<br /><br />Prosiłbym o wyjaśnienie o co tu chodzi. <br /><br />Kod jest wzięty ze strony <a href="http://www.jb.man.ac.uk/~slowe/cpp/itoa.html"  class="postlink">http://www.jb.man.ac.uk/~slowe/cpp/itoa.html</a><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1233">afrikanerhart</a> — 31 mar 2015, o 22:59</p><hr />
]]></content>
</entry>
</feed>