<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
					xmlns:content="http://purl.org/rss/1.0/modules/content/"
					xmlns:wfw="http://wellformedweb.org/CommentAPI/"
					xmlns:atom="http://www.w3.org/2005/Atom"
				  >
<channel>
<atom:link rel="self"  type="application/rss+xml"  href="http://rulinux.net/rss_from_sect_4_subsect_6_thread_34038"  />
<title>rulinux.net - Форум - Development - cpp вопрос преобразование типов</title>
<link>http://rulinux.net/</link>
<description><![CDATA[Портал о GNU/Linux и не только]]></description>
<image><title>rulinux.net - Форум - Development - cpp вопрос преобразование типов</title>
<link>http://rulinux.net/</link>
<url>http://rulinux.net/rss_icon.png</url>
</image>
<item>
<title>Re: cpp вопрос преобразование типов</title>
<link>https://rulinux.net/message.php?newsid=34038&amp;page=1#99747</link>
<guid>https://rulinux.net/message.php?newsid=34038&amp;page=1#99747</guid>
<pubDate>Fri, 15 Jul 2011 09:26:03 +0400</pubDate>
<description><![CDATA[<p>thx!</p>]]></description>
</item>
<item>
<title>Re: cpp вопрос преобразование типов</title>
<link>https://rulinux.net/message.php?newsid=34038&amp;page=1#99746</link>
<guid>https://rulinux.net/message.php?newsid=34038&amp;page=1#99746</guid>
<pubDate>Fri, 15 Jul 2011 09:14:00 +0400</pubDate>
<description><![CDATA[<p>Или LL для long long.</p>]]></description>
</item>
<item>
<title>Re: cpp вопрос преобразование типов</title>
<link>https://rulinux.net/message.php?newsid=34038&amp;page=1#99745</link>
<guid>https://rulinux.net/message.php?newsid=34038&amp;page=1#99745</guid>
<pubDate>Fri, 15 Jul 2011 09:13:38 +0400</pubDate>
<description><![CDATA[<p>ха! спасибо! получилось так:</p><p>ra=(double)n1/0x100000000ull*24.0;</p><p>dec=(double)n2/0x100000000ull*360.0;</p><p>)) </p>]]></description>
</item>
<item>
<title>Re: cpp вопрос преобразование типов</title>
<link>https://rulinux.net/message.php?newsid=34038&amp;page=1#99744</link>
<guid>https://rulinux.net/message.php?newsid=34038&amp;page=1#99744</guid>
<pubDate>Fri, 15 Jul 2011 09:11:50 +0400</pubDate>
<description><![CDATA[<p>Добавь L в конце шестнадцатиричных констант: 0x....L</p>]]></description>
</item>
<item>
<title>cpp вопрос преобразование типов</title>
<link>https://rulinux.net/message.php?newsid=34038&amp;page=1#99743</link>
<guid>https://rulinux.net/message.php?newsid=34038&amp;page=1#99743</guid>
<pubDate>Fri, 15 Jul 2011 08:52:00 +0400</pubDate>
<description><![CDATA[<p>есть программа libindi, которая при сборке ругается на преобразование типов, я выдрал код оттуда на который происходит ругань</p><p><fieldset><legend>cpp</legend><code><br />
<span style="color: #339900;">#include &quot;stdio.h&quot;</span><br />
<span style="color: #339900;">#include &quot;stdlib.h&quot;</span><br />
<span style="color: #339900;">#include &quot;string.h&quot;</span><br />
<br />
<span style="color: #0000ff;">void</span> f<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span><br />
<br />
<span style="color: #0000ff;">double</span> ra,dec<span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">int</span> n1,n2<span style="color: #008080;">;</span><br />
<br />
ra<span style="color: #000080;">=</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">double</span><span style="color: #008000;">&#41;</span>n1<span style="color: #000040;">/</span>0x100000000<span style="color: #000040;">*</span><span style="color:#800080;">24.0</span><span style="color: #008080;">;</span><br />
dec<span style="color: #000080;">=</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">double</span><span style="color: #008000;">&#41;</span>n2<span style="color: #000040;">/</span>0x100000000<span style="color: #000040;">*</span><span style="color:#800080;">360.0</span><span style="color: #008080;">;</span><br />
<br />
<span style="color: #008000;">&#125;</span><br />
<br />
&nbsp;</code></fieldset></p><p>оно ругается вот так:</p><p>x.cpp:10: error: integer constant is too large for Б─≤longБ─≥ type</p><p>x.cpp:11: error: integer constant is too large for Б─≤longБ─≥ type</p><p>как мне изменить этот код, чтобы оно перестало ругаться?</p><p># gcc -v</p><p>Using built-in specs.</p><p>Target: i386-redhat-linux</p><p>Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux</p><p>Thread model: posix</p><p>gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)</p><p></p>]]></description>
</item>
</channel>
</rss>