<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>i can&#39;t use &quot;fopen&quot; function in my program</title>
		<link>http://www.allegro.cc/forums/view/503241</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 29 Jun 2005 22:25:11 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i get problems when i try to use stdio.h &quot;fopen&quot; function in my program.</p><p>i just try to save information of appointments in a txt file but as far as i am concered i can&#39;t get my file opened. I am in such a hurry and i need someone to help me desperately. I will attach my &quot;C&quot; file here so that anyone that wants to help can see the code i&#39;m talking about.<br />Is just a project wich implements an agenda that ask whether to add eliminate list the tasks or to give more or less priority to a task. every change is stored in the &quot;tareas.txt&quot; file. For now i&#39;m still strugglin&#39; to stre things in the txt file and i dont have all the options finished.</p><p>PS: Sorry if my english is not correct. I hope you understand.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sofi saltana)</author>
		<pubDate>Tue, 28 Jun 2005 20:20:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><span class="source-code"><span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>fichero<span class="k3">=</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_337.html" target="_blank">fopen</a><span class="k2">(</span><span class="s">"tareas.txt"</span>,<span class="s">"r+t"</span><span class="k2">)</span><span class="k2">)</span> <span class="k3">=</span><span class="k3">=</span>NULL<span class="k2">)</span></span>What is r+t? You want that to be &quot;w+&quot;, I think.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 28 Jun 2005 20:29:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Code is good but you have not file &quot;tareas.txt&quot; on a disk.<br />r+ mean read, write, but file have to be on the disk.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (marcin)</author>
		<pubDate>Tue, 28 Jun 2005 20:37:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If the file can&#39;t be opened, then your program tries to use allegro_message(), but allegro is not initialised yet, so I guess it crash. Move allegro_init(); to the top, and check again.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (PaulSiramy)</author>
		<pubDate>Tue, 28 Jun 2005 20:38:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Of course allegro_init() ... <img src="http://www.allegro.cc/forums/smileys/rolleyes.gif" alt="::)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (marcin)</author>
		<pubDate>Tue, 28 Jun 2005 20:49:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I have &quot;tareas.txt&quot; in the same folder where i have my project so there must be no problem, isn&#39;t it? correct me if i&#39;m wrong. it could be the problem. I know that the allegro_message() is not in its place. At first i put it after allegro_init() but even then it didnt opened the file, nor executed none of the 2 allegro_message(). And that is the real problem i have THE PROGRAM DON&#39;T EXECUTE THE &quot;fopen&quot; AND BOTH OF THE &quot;allegro_message&quot;.<br />If somebody have some idea of this plaese help.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sofi saltana)</author>
		<pubDate>Tue, 28 Jun 2005 21:41:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>I have &quot;tareas.txt&quot; in the same folder where i have my project so there must be no problem, isn&#39;t it?</p></div></div><p>Where is the executeable and from where do you call it(from IDE, shortcut, ...)?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Tue, 28 Jun 2005 21:43:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Put the executable and text file in the same directory.</p><p>Replace allegro_message() with:</p><p>printf(&quot;\ncan&#39;t open file\n&quot;);</p><p>And run your program from command line window.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (marcin)</author>
		<pubDate>Tue, 28 Jun 2005 21:48:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Do you doubleclick the executable?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ReyBrujo)</author>
		<pubDate>Tue, 28 Jun 2005 21:49:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>my executable is in a folder on my desktop but i don&#39;t understand what you wanna say with from where i call it from. i just compile my program with dev-c++. is that what you are asking for?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sofi saltana)</author>
		<pubDate>Tue, 28 Jun 2005 21:51:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Do you execute it with F5 only? If so, check inside your project folder. There must be a Debug and a Release folder. Put the text file inside each of those folders (it is possible you only have Release or Debug).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ReyBrujo)</author>
		<pubDate>Tue, 28 Jun 2005 22:00:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i am not really sure of what you are saying. Would you tell me the extensión of the files you are talking about. I have a lot of files in my  folder (&quot;.res&quot;,&quot;makefile.win&quot;,&quot;.layout&quot;,&quot;.exe.manifest&quot;,&quot;.rc&quot;, but some of them buy stay there from other compilations of my code).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sofi saltana)</author>
		<pubDate>Tue, 28 Jun 2005 22:07:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Put the file &#39;tareas.txt&#39; in C:\. Then use </p><div class="source-code snippet"><div class="inner"><pre><span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>fichero<span class="k3">=</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_337.html" target="_blank">fopen</a><span class="k2">(</span><span class="s">"C:\\tareas.txt"</span>,<span class="s">"r+t"</span><span class="k2">)</span><span class="k2">)</span> <span class="k3">=</span><span class="k3">=</span>NULL<span class="k2">)</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Rampage)</author>
		<pubDate>Tue, 28 Jun 2005 22:10:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You have your files in a folder, say, &quot;C:\MyProject&quot;. When you compile with Dev-C++, it may create a folder and put the object and executable files there. So, it is possible Dev-C++ puts the executable file in &quot;C:\MyProject\Debug&quot;. If you have your text file in &quot;C:\MyProject&quot;, the executable won&#39;t read it. So, get absolutely sure the executable you are running is in the same directory as your text file.</p><p>Windows is a bit strange and may search for your files anywhere.</p><p>(Edited: Check <a href="http://www.allegro.cc/forums/view_thread.php?_id=376171#target">this</a> link for a proper way of finding the path to your resources).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ReyBrujo)</author>
		<pubDate>Tue, 28 Jun 2005 22:10:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>When you compile a .c file, you get a .exe file. Put the .exe file in the same folder as the .txt file and run it from the command prompt!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (miran)</author>
		<pubDate>Tue, 28 Jun 2005 22:11:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
my executable is in a folder on my desktop
</p></div></div><p>

Put into this folder file tareas.txt.</p><p>Open this folder and </p><p>if you have win98:</p><p>- click start button<br />- click run command<br />- in opened &quot;run window&quot; type:</p><p>command</p><p>- in black window type name of your executable file</p><p>if you have winXP</p><p>- create empty text file with name &quot;cmdline.cmd&quot;<br />- in this file type:</p><p>cmd</p><p>- save and close this file<br />- double click on this file in folder window<br />- in black window type name of your executable file
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (marcin)</author>
		<pubDate>Tue, 28 Jun 2005 22:39:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>marcin: Congratualations! Most redundant method of opening a program this week!</p><p>Try just:</p><p>if you have winXP</p><p>- click start button<br />- click run command<br />- in opened &quot;run window&quot; type:</p><p>cmd</p><p>- in black window type name of your executable file
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 28 Jun 2005 22:43:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
marcin: Congratualations! Most redundant method of opening a program this week!
</p></div></div><p>

Thank you !!! <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>But seriously I had windows XP and if I just type &quot;command&quot; in &quot;run&quot; window, I always landed on Desktop (or MyDocuments, I don&#39;t remember exactly) (even if I opened another folder before cmd).<br />Only method with *.cmd files worked.<br />Ask Bill: why?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (marcin)</author>
		<pubDate>Tue, 28 Jun 2005 22:50:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Do you know what &quot;cd&quot; does?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 28 Jun 2005 23:10:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i just tried your way to avoid problems with the location of the file, ReyBrujo, but i still have problems. when i try to compile it i get the &quot;permission denied&quot; error.<br />And for the first thing you said about that dev-c++ create a debug folder, its not true in my case. i have no debug folder instead i have a lot of files in the same folder and it is in this folder where i have the text file, object file and so on.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sofi saltana)</author>
		<pubDate>Tue, 28 Jun 2005 23:10:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Do you know what &quot;cd&quot; does?
</p></div></div><p>

I know but under windows TAB doesn&#39;t complete path elements (or makes it bad) (Linux has this tool).<br />And with *.cmd files was faster.<br />(Show me one person who installs windows to manages files from command line <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />);</p><p>EDIT:</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
..when i try to compile it i get the &quot;permission denied&quot; error.
</p></div></div><p>

Maybe you are running you program under debugger during compilation.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (marcin)</author>
		<pubDate>Tue, 28 Jun 2005 23:14:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Press ctrl+alt+delete and in the window that pops up click the processes tab, find your exe and kill it. Then try compiling again.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (miran)</author>
		<pubDate>Tue, 28 Jun 2005 23:32:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>   &gt;Maybe you are running you program under debugger during compilation</p><p>i dont really understand what you want to say with this. i am using dev-c++ compiler and as far as i am concerned i can&#39;t compile the code while using debugger dev-c++ judt dont let you. But that dont seem to be my problem i have some lines of code that my program just dont run (see above: fopen() &amp; allegro_message()), i even changed the allegro_message  functions with printf functions but i still cant get them run. </p><p>REYBRUJO<br />&gt;You have your files in a folder, say, &quot;C:\MyProject&quot;. When you compile &gt;with Dev-C++, it may create a folder and put the object and executable &gt;files there. So, it is possible Dev-C++ puts the executable file &gt;in &quot;C:\MyProject\Debug&quot;. If you have your text file in &quot;C:\MyProject&quot;, &gt;the executable won&#39;t read it. So, get absolutely sure the executable &gt;you are running is in the same directory as your text file.<br />&gt;<br />&gt;Windows is a bit strange and may search for your files anywhere.<br />&gt;<br />&gt;(Edited: Check this link for a proper way of finding the path to your &gt;resources).</p><p>When i compile my project the compiler don&#39;t create any Debug folder i just have everything mixed-up
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sofi saltana)</author>
		<pubDate>Tue, 28 Jun 2005 23:45:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What do you have in your directory? Post the names of the files.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ReyBrujo)</author>
		<pubDate>Wed, 29 Jun 2005 00:04:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I don&#39;t want to derail this thread, so this will be my last reply:</p><p>marcin: Windows XP with cmd does have tab completion of path names.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Wed, 29 Jun 2005 00:05:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
... doesn&#39;t complete path elements (or makes it bad)
</p></div></div><p>

If you have it try use it. Some XPs (new or with updates) has it but it works terrible.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (marcin)</author>
		<pubDate>Wed, 29 Jun 2005 00:12:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Tab completion for Windows XP works for me (but it doesn&#39;t work identical to Linux!  It is different but it works as designed).  It also exists in Win2000, with a registry &quot;hack&quot;
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gillius)</author>
		<pubDate>Wed, 29 Jun 2005 00:16:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Tab completion for Windows XP works for me ...
</p></div></div><p>

OK, I have habits from Linux.<br />If it doesn&#39;t complete name of a file or a dir after I press TAB it doesn&#39;t work for me. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>EDIT:</p><p>(Habits are the second nature of Human.)</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
but it works as designed
</p></div></div><p>

Everything works as designed... <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /><br />(Only often designers can&#39;t predict some additional features...)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (marcin)</author>
		<pubDate>Wed, 29 Jun 2005 00:20:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>the files i have in my folder are:<br />-agenda.c<br />-agenda.dev<br />-agenda.exe.Manifest<br />-agenda.exe<br />-agenda.layout<br />-agenda.o<br />-agenda_private.h<br />-agenda_private.rc<br />-agenda_private.res<br />-makefile.win<br />-teraes.txt<br />-6 bitmaps(they are just bitmaps used as buttons)</p><p>(note that this folder contains all the files that were generated from other compilations)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sofi saltana)</author>
		<pubDate>Wed, 29 Jun 2005 00:43:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>-t<b>e</b>raes.txt vs if ((fichero=fopen(&quot;tareas.txt&quot;,&quot;r+t&quot;)) ==NULL)<br />Is that a typo?<br />Does this program work if you execute the program directly(doubleclick on <br />it in explorer)?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Wed, 29 Jun 2005 00:55:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Is that a typo?
</p></div></div><p>

Good work Sherlock HoHolmes !!! <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>(But I said at start that he has not tareas.txt) <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (marcin)</author>
		<pubDate>Wed, 29 Jun 2005 01:02:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Marcin   &gt;(But I said at start that he has not tareas.txt)</p><p>i do have tareas.txt in the same folder i have my executable. but i still can&#39;t get this file opened. Please try to help.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sofi saltana)</author>
		<pubDate>Wed, 29 Jun 2005 01:19:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Please try to help.
</p></div></div><p>

Did you run executable from command line window and with printf(...) in code?</p><p>EDIT:</p><p>Can you compile this example:</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="p">#include &lt;stdio.h&gt;</span></td></tr><tr><td class="number">2</td><td><span class="p">#include &lt;stdlib.h&gt;</span></td></tr><tr><td class="number">3</td><td>&#160;</td></tr><tr><td class="number">4</td><td>&#160;</td></tr><tr><td class="number">5</td><td><span class="k1">int</span> main<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span></td></tr><tr><td class="number">6</td><td><span class="k2">{</span></td></tr><tr><td class="number">7</td><td>  FILE <span class="k3">*</span>fichero<span class="k2">;</span></td></tr><tr><td class="number">8</td><td>&#160;</td></tr><tr><td class="number">9</td><td>  <span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>fichero<span class="k3">=</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_337.html" target="_blank">fopen</a><span class="k2">(</span><span class="s">"tareas.txt"</span>,<span class="s">"r+t"</span><span class="k2">)</span><span class="k2">)</span> <span class="k3">=</span><span class="k3">=</span>NULL<span class="k2">)</span></td></tr><tr><td class="number">10</td><td>  <span class="k2">{</span></td></tr><tr><td class="number">11</td><td>&#160;</td></tr><tr><td class="number">12</td><td>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"\nError al abrir fichero.\n"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">13</td><td>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span>EXIT_SUCCESS<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">14</td><td>  <span class="k2">}</span></td></tr><tr><td class="number">15</td><td>  </td></tr><tr><td class="number">16</td><td>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_345.html" target="_blank">fprintf</a><span class="k2">(</span>fichero, <span class="s">"%s"</span>, <span class="s">"asdf"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">17</td><td>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_308.html" target="_blank">fclose</a><span class="k2">(</span>fichero<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">18</td><td>&#160;</td></tr><tr><td class="number">19</td><td>  <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span></td></tr><tr><td class="number">20</td><td><span class="k2">}</span></td></tr></tbody></table></div></div><p>

And run it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (marcin)</author>
		<pubDate>Wed, 29 Jun 2005 01:23:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>yes i did but my program never execute the code lines that suppose to open file and report if the file is opened. And as you said i tried with allegro_message and printf but i get the same result
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sofi saltana)</author>
		<pubDate>Wed, 29 Jun 2005 01:27:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>And what about the code from my previous post (the EDIT section)?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
... my program never execute the code lines that suppose to open file and report if the file is opened.
</p></div></div><p>

But if it&#39;s not opened you should obtain message.</p><p>EDIT:</p><p>I just have compiled you code.</p><p>I run it and the file is opened OK.</p><p>But there is another problem. GUI is opened and closed immediately.</p><p>And this appear after:</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/do_dialog" target="_blank"><span class="a">do_dialog</span></a><span class="k2">(</span>the_dialog, <span class="k3">-</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (marcin)</author>
		<pubDate>Wed, 29 Jun 2005 01:38:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i compiled it and it gives no problem (it worxed). I already tried this earlier.<br />When i saw that it worked i wondered if the problem was in the allegro way to execute porgram, or something with allegro anyway; thats why in the code i attached in my first question the fopen was put before allegro_init.<br />even then it didn&#39;t worked so i got run out of ideas.</p><p>EDIT:</p><p>i cant get it working in my computer y would like to get the code of the open file to ensure how is the code that works(because i changed my code many times, maybe it will work even in my computer). <br />About the dialog it is supposed to open the dialog the_dialog and when this dialog opens, the user have to choose if he wants to add a new task. If he choose to add, the aniadir function will change a variable that will make switch enter the dialog aniadirtarea. But &quot;the_dialog&quot; dialog should not close automatically.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sofi saltana)</author>
		<pubDate>Wed, 29 Jun 2005 01:57:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Can you replace your code with this:</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>fichero<span class="k3">=</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_337.html" target="_blank">fopen</a><span class="k2">(</span><span class="s">"tareas.txt"</span>,<span class="s">"r+t"</span><span class="k2">)</span><span class="k2">)</span> <span class="k3">=</span><span class="k3">=</span>NULL<span class="k2">)</span><span class="k2">{</span>

 <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"\nError al abrir fichero.\n"</span><span class="k2">)</span><span class="k2">;</span>

<span class="k2">}</span>

<span class="k1">else</span>

<a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"\nfichero ABIERTO.\n"</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

And run it from command line.</p><p>Read EDIT in my previous post about problem with the GUI.</p><p>EDIT:</p><p>I have question:</p><p>In Allegro 4.0.3</p><p>allegro_message()</p><p>works without set_gfx_mode() ?</p><p>EDIT:</p><p>(If do you use 4.0.3 version of course)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (marcin)</author>
		<pubDate>Wed, 29 Jun 2005 02:00:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>In Allegro 4.0.3</p><p>allegro_message()</p><p>works without set_gfx_mode() ?</p></div></div><p>
Yes. Actually, you should only use it if you&#39;re not in graphics mode.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Wed, 29 Jun 2005 03:45:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>ok! you really gave me the key to the problem i have. The problem is a big fault i made at creating the txt file. Unconsciously i created a tareas.txt.txt file, thats why i couldn&#39;t get my file opened, because i never called it.<br />As Marcin said, and Evert confirmed (thank you both for the help), allegro_message don&#39;t work in graphics mode. That&#39;s why i had the impression that those line of code never got run.<br />When Marcin told me that my code worked i had the confirmation that there was something wrong with me.</p><p>i&#39;m really glade to have found these place. thank you all of you speccially MARCIN &amp; REYBRUJO both of them helped me trough lots of messages.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (sofi saltana)</author>
		<pubDate>Wed, 29 Jun 2005 06:10:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
As Marcin said, and Evert confirmed (thank you both for the help), allegro_message don&#39;t work in graphics mode.
</p></div></div><p>

I&#39;m only asked that it works without graphics mode.<br />(I&#39;m newbie in Allegro)<br />(But path was good)</p><p>Evert said that we shouldn&#39;t use it in gfx mode.</p><p><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (marcin)</author>
		<pubDate>Wed, 29 Jun 2005 22:25:11 +0000</pubDate>
	</item>
</rss>
