<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: C Tutorial &#8211; Deleting and Renaming a File</title>
	<atom:link href="http://www.codingunit.com/c-tutorial-deleting-and-renaming-a-file/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codingunit.com/c-tutorial-deleting-and-renaming-a-file</link>
	<description>CodingUnit is your online resource for learning to program. Tutorials on C, C++, PHP, Python, MySQL, Java, JQuery, Opengl, DirectX and much more!</description>
	<lastBuildDate>Mon, 06 Feb 2012 06:08:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: furqan</title>
		<link>http://www.codingunit.com/c-tutorial-deleting-and-renaming-a-file/comment-page-1#comment-1928</link>
		<dc:creator>furqan</dc:creator>
		<pubDate>Thu, 04 Nov 2010 07:59:58 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=220#comment-1928</guid>
		<description>i confuse how to change file name if i have a file with &quot;c/:desktop/fur.txt&quot;
destination so how can i rename it plzzzzzzz plzzzzzz help me</description>
		<content:encoded><![CDATA[<p>i confuse how to change file name if i have a file with &#8220;c/:desktop/fur.txt&#8221;<br />
destination so how can i rename it plzzzzzzz plzzzzzz help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.codingunit.com/c-tutorial-deleting-and-renaming-a-file/comment-page-1#comment-812</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 07 Feb 2010 18:32:42 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=220#comment-812</guid>
		<description>@Hubiab  -  I don&#039;t know exactly what you mean, because this C language tutorial is about removing files.
So I make the assumption that you mean without any code around the remove() function. I get this on windows:

#include &lt;stdio.h&gt; 
void main()
{
      remove(&quot;c:/test.txt&quot;);
}

Hope that this is what you mean.</description>
		<content:encoded><![CDATA[<p>@Hubiab  &#8211;  I don&#8217;t know exactly what you mean, because this C language tutorial is about removing files.<br />
So I make the assumption that you mean without any code around the remove() function. I get this on windows:</p>
<p>#include &lt;stdio.h&gt;<br />
void main()<br />
{<br />
      remove(&#8220;c:/test.txt&#8221;);<br />
}</p>
<p>Hope that this is what you mean.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hudiab</title>
		<link>http://www.codingunit.com/c-tutorial-deleting-and-renaming-a-file/comment-page-1#comment-810</link>
		<dc:creator>Hudiab</dc:creator>
		<pubDate>Sun, 07 Feb 2010 13:16:38 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=220#comment-810</guid>
		<description>i want to delete a file directly.plz help me</description>
		<content:encoded><![CDATA[<p>i want to delete a file directly.plz help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.codingunit.com/c-tutorial-deleting-and-renaming-a-file/comment-page-1#comment-567</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 05 Oct 2009 07:32:56 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=220#comment-567</guid>
		<description>My fault, I see now what the problem is: &#039;gets_s&#039; is not part of the C standard, so it depends on your compiler if it is implemented. I use visual studio and they have implemented &#039;gets_s&#039; and it looks like your compiler doesn&#039;t.</description>
		<content:encoded><![CDATA[<p>My fault, I see now what the problem is: &#8216;gets_s&#8217; is not part of the C standard, so it depends on your compiler if it is implemented. I use visual studio and they have implemented &#8216;gets_s&#8217; and it looks like your compiler doesn&#8217;t.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.codingunit.com/c-tutorial-deleting-and-renaming-a-file/comment-page-1#comment-34</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 04 Oct 2009 10:09:11 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=220#comment-34</guid>
		<description>I don&#039;t know exact what the problem is (looks your missing an include), but I re-tested the two examples again using VS 2008 (console application) and they worked fine. 

To get &lt;strong&gt;your&lt;/strong&gt; source code example to work I had to add #include &lt;stdlib.h&gt;  (for the system(); function), then it also works.

More info about gets_s and why to use it can be found &lt;a href=&quot;https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/coding/300-BSI.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know exact what the problem is (looks your missing an include), but I re-tested the two examples again using VS 2008 (console application) and they worked fine. </p>
<p>To get <strong>your</strong> source code example to work I had to add #include &lt;stdlib.h&gt;  (for the system(); function), then it also works.</p>
<p>More info about gets_s and why to use it can be found <a href="https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/coding/300-BSI.html" rel="nofollow">here</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony</title>
		<link>http://www.codingunit.com/c-tutorial-deleting-and-renaming-a-file/comment-page-1#comment-30</link>
		<dc:creator>Tony</dc:creator>
		<pubDate>Sun, 04 Oct 2009 01:56:13 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=220#comment-30</guid>
		<description>I got this to work!

#include &lt;stdio.h&gt;

int main(void)
{
	char  filename[101], newfilename[101];
    
    printf (&quot;Please type in name of file to be changed:\n&quot;);
    scanf(&quot;%s&quot;, &amp;filename); /* Get the filename from the keyboard) */

	printf(&quot;You have choosen to rename %s.\nPlease type the new name of the file:\n&quot;, filename);
	scanf(&quot;%s&quot;, &amp;newfilename); /* Get the new filename from the keyboard) */

	if(rename(filename, newfilename) == 0)
	{
		printf(&quot;%s has been rename %s.\n&quot;, filename, newfilename);
	}
	else
	{
		fprintf(stderr, &quot;Error renaming %s.\n&quot;, filename);
	}
	system (&quot;pause&quot;);
	system (&quot;CLS&quot;);
	
	return 0;
}</description>
		<content:encoded><![CDATA[<p>I got this to work!</p>
<p>#include &lt;stdio.h&gt;</p>
<p>int main(void)<br />
{<br />
	char  filename[101], newfilename[101];</p>
<p>    printf (&#8220;Please type in name of file to be changed:\n&#8221;);<br />
    scanf(&#8220;%s&#8221;, &amp;filename); /* Get the filename from the keyboard) */</p>
<p>	printf(&#8220;You have choosen to rename %s.\nPlease type the new name of the file:\n&#8221;, filename);<br />
	scanf(&#8220;%s&#8221;, &amp;newfilename); /* Get the new filename from the keyboard) */</p>
<p>	if(rename(filename, newfilename) == 0)<br />
	{<br />
		printf(&#8220;%s has been rename %s.\n&#8221;, filename, newfilename);<br />
	}<br />
	else<br />
	{<br />
		fprintf(stderr, &#8220;Error renaming %s.\n&#8221;, filename);<br />
	}<br />
	system (&#8220;pause&#8221;);<br />
	system (&#8220;CLS&#8221;);</p>
<p>	return 0;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony</title>
		<link>http://www.codingunit.com/c-tutorial-deleting-and-renaming-a-file/comment-page-1#comment-29</link>
		<dc:creator>Tony</dc:creator>
		<pubDate>Sun, 04 Oct 2009 01:30:30 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=220#comment-29</guid>
		<description>This example does not work!  Using Dev C++ compliler version 4.9.9.2 as well I receive the following compile error:
  [Linker error] undefined reference to `gets_s&#039;</description>
		<content:encoded><![CDATA[<p>This example does not work!  Using Dev C++ compliler version 4.9.9.2 as well I receive the following compile error:<br />
  [Linker error] undefined reference to `gets_s&#8217;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

