<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Exforsys - C and C++</title>
		<link>http://www.exforsys.com/forum/</link>
		<description>C and C++</description>
		<language>en</language>
		<lastBuildDate>Sat, 21 Nov 2009 18:58:22 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.exforsys.com/forum/images/misc/rss.jpg</url>
			<title>Exforsys - C and C++</title>
			<link>http://www.exforsys.com/forum/</link>
		</image>
		<item>
			<title>.multiply two 4*4 integer matrics</title>
			<link>http://www.exforsys.com/forum/c-and-c/99563-multiply-two-4-4-a.html</link>
			<pubDate>Thu, 19 Nov 2009 14:35:29 GMT</pubDate>
			<description>. can any one help me to do...</description>
			<content:encoded><![CDATA[<div>. can any one help me to do this<br />
multiply two 4*4 integer matrics<br />
.swap two numbers without using a third variable<br />
.read details of  10 students(name,roll no:,score)<br />
sort the student record with score ,and print it</div>

]]></content:encoded>
			<category domain="http://www.exforsys.com/forum/c-and-c/">C and C++</category>
			<dc:creator>reshmajohney</dc:creator>
			<guid isPermaLink="true">http://www.exforsys.com/forum/c-and-c/99563-multiply-two-4-4-a.html</guid>
		</item>
		<item>
			<title>Print Prime numbers</title>
			<link>http://www.exforsys.com/forum/c-and-c/99538-print-prime-numbers.html</link>
			<pubDate>Sun, 08 Nov 2009 17:54:20 GMT</pubDate>
			<description>HI, 
Want help in writing a...</description>
			<content:encoded><![CDATA[<div>HI,<br />
Want help in writing a program in C. :Print first 25 prime numbers.</div>

]]></content:encoded>
			<category domain="http://www.exforsys.com/forum/c-and-c/">C and C++</category>
			<dc:creator>reshum</dc:creator>
			<guid isPermaLink="true">http://www.exforsys.com/forum/c-and-c/99538-print-prime-numbers.html</guid>
		</item>
		<item>
			<title>can i have a logic to calculate employee H R</title>
			<link>http://www.exforsys.com/forum/c-and-c/99500-can-i-have-logic.html</link>
			<pubDate>Thu, 22 Oct 2009 19:10:30 GMT</pubDate>
			<description>i a beginer of c language,...</description>
			<content:encoded><![CDATA[<div>i a beginer of c language, and can i have a logic how to find a H R and all the complete calculation of an employee using structures concept.....</div>

]]></content:encoded>
			<category domain="http://www.exforsys.com/forum/c-and-c/">C and C++</category>
			<dc:creator>imranu99</dc:creator>
			<guid isPermaLink="true">http://www.exforsys.com/forum/c-and-c/99500-can-i-have-logic.html</guid>
		</item>
		<item>
			<title>how to make the password in to asterisk and asign a exact password for char.</title>
			<link>http://www.exforsys.com/forum/c-and-c/99485-how-make-password-asterisk.html</link>
			<pubDate>Mon, 12 Oct 2009 11:15:08 GMT</pubDate>
			<description>uhm.... excuse me but can you...</description>
			<content:encoded><![CDATA[<div>uhm.... excuse me but can you please help me? i'm having trouble with making password in TURBO c.... the condition goes like this, while the user is entering a password, the user will not see alpha-numeric characters instead, he/ she can see only asterisk... and the computer will read the password.<br />
if the password is 'liza' it will clear the screen and it will loading...if it`s not it will print 'failed to log-in'<br />
can you please tell me the code?????<br />
<br />
<br />
my only problem is how to asign password and the computer or the program will read the password <br />
<br />
here`s my code:<br />
<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">#include&lt;conio.h&gt;<br />
#include&lt;stdio.h&gt;<br />
main()<br />
{<br />
<br />
char *ptr;<br />
char pwd[150];<br />
char c;<br />
int a,x;<br />
int i=0;<br />
char password[15];<br />
<br />
&nbsp; &nbsp; &nbsp; clrscr();<br />
<br />
&nbsp; &nbsp; &nbsp; printf(&quot;ENTER PASsword&quot;);<br />
<br />
<br />
while(1)<br />
{<br />
<br />
&nbsp;  gets(password);<br />
&nbsp;  x=strcmp(password, &quot;liza&quot;);<br />
&nbsp; c=getch();<br />
if(c==13)<br />
{<br />
<br />
pwd[i]=NULL;<br />
break;<br />
}<br />
<br />
printf(&quot;*&quot;);<br />
pwd[i++] = c;<br />
}<br />
&nbsp;  if(x!=0)<br />
&nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf(&quot;FAILED TO LOG-IN&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp;  clrscr();<br />
<br />
&nbsp; &nbsp; &nbsp; for(a=1;a&lt;=80;a++)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; gotoxy(a,1);printf(&quot;\xDB&quot;);<br />
&nbsp; &nbsp; gotoxy(a,24);printf(&quot;\xDB&quot;);<br />
&nbsp; &nbsp; delay(990);<br />
&nbsp; &nbsp; gotoxy(37,13);printf(&quot;LOADING!!!&quot;);<br />
&nbsp; &nbsp; }<br />
<br />
getch();<br />
}</code><hr />
</div>kindly help me..thnx in advance</div>

]]></content:encoded>
			<category domain="http://www.exforsys.com/forum/c-and-c/">C and C++</category>
			<dc:creator>liza12</dc:creator>
			<guid isPermaLink="true">http://www.exforsys.com/forum/c-and-c/99485-how-make-password-asterisk.html</guid>
		</item>
		<item>
			<title>Struct as an array of pointers to struct</title>
			<link>http://www.exforsys.com/forum/c-and-c/99468-struct-array-pointers-struct.html</link>
			<pubDate>Tue, 29 Sep 2009 22:06:23 GMT</pubDate>
			<description>Here it goes. 
I have a...</description>
			<content:encoded><![CDATA[<div>Here it goes.<br />
I have a little problem when trying to use the struct proyecto_t,<br />
The code  1 below is a copy of my structures file.<br />
Then there's a copy of one of the procedures that is working fine with a proyecto_t variable. That's code 2.<br />
But when I try to access a element pointed by PRO-&gt;actividades[i]-&gt;dur, that is a unsigned int with scanf(), my program crashes... I did try to use the address of (&amp;) operator and also tried using it twice but nothing happens it is still crashing at runtime.<br />
Code 3 is the copy of the procedures that fails. <br />
<br />
1. I tried to use array notation.<br />
2. Also using the pointer arithmetic, but it is still crashing<br />
<br />
Thanks a lot, meanwhile I'll be trying to help someone else xD:icon13: <br />
<br />
1.---------CODE---------------<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">#ifndef _ST_ACTIVIDAD_<br />
#define _ST_ACTIVIDAD_<br />
struct actividad <br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; char name[15];<br />
&nbsp; &nbsp; &nbsp; &nbsp; unsigned int dur; <br />
};<br />
typedef struct actividad actividad_t;<br />
#endif<br />
<br />
#ifndef _ST_PROYECTO_<br />
#define _ST_PROYECTO_<br />
struct proyecto<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; unsigned int n; <br />
&nbsp; &nbsp; &nbsp; &nbsp; actividad_t *actividades; // here it is, this is the one that's not working<br />
};<br />
typedef struct proyecto proyecto_t;<br />
#endif<br />
<br />
#ifndef _ST_RELACION_<br />
#define _ST_RELACION_<br />
struct relacion<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; short **relaciones; // THIS WORKS FINE AS A MATRIX<br />
};<br />
typedef struct relacion relacion_t;<br />
#endif</code><hr />
</div><br />
2.------CODE------------<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">#ifndef P_INI_ST<br />
#define P_INI_ST<br />
void ini(proyecto_t *PRO, relacion_t *REL)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; unsigned int<br />
&nbsp; &nbsp; &nbsp; &nbsp; i;<br />
&nbsp; &nbsp; &nbsp; &nbsp; PRO-&gt;actividades = (actividad_t*) malloc(sizeof(actividad_t)*(PRO-&gt;n));// No warnings from the compiler here.<br />
&nbsp; &nbsp; &nbsp; &nbsp; REL-&gt;relaciones= (short**) malloc(sizeof(short*)*PRO-&gt;n);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; for(i=0;i&lt;PRO-&gt;n;i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; REL-&gt;relaciones[i]= (short*) malloc(sizeof(short)*PRO-&gt;n);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
}<br />
#endif</code><hr />
</div>3.-------CODE-------<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">#ifndef P_LEER_PROYECTO_ST<br />
#define&nbsp; &nbsp; &nbsp; &nbsp; P_LEER_PROYECTO_ST<br />
void leer_proyecto(proyecto_t *PRO, relacion_t *REL)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; unsigned int<br />
&nbsp; &nbsp; &nbsp; &nbsp; i;<br />
&nbsp; &nbsp; &nbsp; &nbsp; for(i=0;i&lt;PRO-&gt;n;i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf(&quot;Ingrese actividad: &quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scanf(&quot;%[^\n]s&quot;,&amp;(PRO-&gt;actividades[i]-&gt;name));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf(&quot;Ingrese duracion: &quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scanf(&quot;%u&quot;,&amp;(PRO-&gt;actividades[i]-&gt;dur)); // When here it crashes<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
}<br />
#endif</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.exforsys.com/forum/c-and-c/">C and C++</category>
			<dc:creator>galileopy</dc:creator>
			<guid isPermaLink="true">http://www.exforsys.com/forum/c-and-c/99468-struct-array-pointers-struct.html</guid>
		</item>
		<item>
			<title>Struct as an array of pointers to struct</title>
			<link>http://www.exforsys.com/forum/c-and-c/99467-struct-array-pointers-struct.html</link>
			<pubDate>Tue, 29 Sep 2009 21:56:21 GMT</pubDate>
			<description>Here it goes. 
I have a...</description>
			<content:encoded><![CDATA[<div>Here it goes.<br />
I have a little problem when trying to use the struct proyecto_t,<br />
The code  1 below is a copy of my structures file.<br />
Then there's a copy of one of the procedures that is working fine with a proyecto_t variable. That's code 2.<br />
But when I try to access a element pointed by PRO-&gt;actividades[i]-&gt;dur, that is a unsigned int with scanf(), my program crashes... I did try to use the address of (&amp;) operator and also tried using it twice but nothing happens it is still crashing at runtime.<br />
Code 3 is the copy of the procedures that fails. <br />
<br />
1.---------CODE---------------<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">#ifndef _ST_ACTIVIDAD_<br />
#define _ST_ACTIVIDAD_<br />
struct actividad <br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; char name[15];<br />
&nbsp; &nbsp; &nbsp; &nbsp; unsigned int dur; <br />
};<br />
typedef struct actividad actividad_t;<br />
#endif<br />
<br />
#ifndef _ST_PROYECTO_<br />
#define _ST_PROYECTO_<br />
struct proyecto<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; unsigned int n; <br />
&nbsp; &nbsp; &nbsp; &nbsp; actividad_t *actividades; :icon14::icon14:<br />
};<br />
typedef struct proyecto proyecto_t;<br />
#endif<br />
<br />
#ifndef _ST_RELACION_<br />
#define _ST_RELACION_<br />
struct relacion<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; short **relaciones; // THIS WORKS FINE AS A MATRIX<br />
};<br />
typedef struct relacion relacion_t;<br />
#endif</code><hr />
</div><br />
2.------CODE------------<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">#ifndef P_INI_ST<br />
#define P_INI_ST<br />
void ini(proyecto_t *PRO, relacion_t *REL)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; unsigned int<br />
&nbsp; &nbsp; &nbsp; &nbsp; i;<br />
&nbsp; &nbsp; &nbsp; &nbsp; PRO-&gt;actividades = (actividad_t*) malloc(sizeof(actividad_t)*(PRO-&gt;n));:icon14::icon14:<br />
&nbsp; &nbsp; &nbsp; &nbsp; REL-&gt;relaciones= (short**) malloc(sizeof(short*)*PRO-&gt;n);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; for(i=0;i&lt;PRO-&gt;n;i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; REL-&gt;relaciones[i]= (short*) malloc(sizeof(short)*PRO-&gt;n);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
}<br />
#endif</code><hr />
</div>3.-------CODE-------<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">#ifndef P_LEER_PROYECTO_ST<br />
#define&nbsp; &nbsp; &nbsp; &nbsp; P_LEER_PROYECTO_ST<br />
void leer_proyecto(proyecto_t *PRO, relacion_t *REL)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; unsigned int<br />
&nbsp; &nbsp; &nbsp; &nbsp; i;<br />
&nbsp; &nbsp; &nbsp; &nbsp; for(i=0;i&lt;PRO-&gt;n;i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf(&quot;Ingrese actividad: &quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scanf(&quot;%[^\n]s&quot;,&amp;(PRO-&gt;actividades[i]-&gt;name));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf(&quot;Ingrese duracion: &quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scanf(&quot;%u&quot;,&amp;(PRO-&gt;actividades[i]-&gt;dur));:icon14::icon14:<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
}<br />
#endif</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.exforsys.com/forum/c-and-c/">C and C++</category>
			<dc:creator>galileopy</dc:creator>
			<guid isPermaLink="true">http://www.exforsys.com/forum/c-and-c/99467-struct-array-pointers-struct.html</guid>
		</item>
	</channel>
</rss>
