<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2574451814120321633</id><updated>2011-11-27T15:59:57.080-08:00</updated><title type='text'>Structures, Int, Char, String types on C++ 2005</title><subtitle type='html'>This program was developed in Microsoft Visual C++ 2005 and it shows a practical usage of structures, int, char and string types on Visual C++ 2005.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://structuresintcharstringvcmasmas2005.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574451814120321633/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://structuresintcharstringvcmasmas2005.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jaime Montoya</name><uri>http://www.blogger.com/profile/16823894261113468942</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/_xxqD9isjXyY/S6xjpG1cqfI/AAAAAAAAO18/D6l_ssNuNNA/S220/jaimemontoya.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2574451814120321633.post-472886391767921557</id><published>2007-05-01T17:22:00.000-07:00</published><updated>2008-07-22T01:21:52.601-07:00</updated><title type='text'>Structures, Int, Char, String types on C++ 2005</title><content type='html'>Clic &lt;a href="http://jaimemontoya.com/datastructure/estructura.rar"&gt;here&lt;/a&gt; to download the program.&lt;br /&gt;Hacer clic &lt;a href="http://jaimemontoya.com/datastructure/estructura.rar"&gt;aquí&lt;/a&gt; para descargar el programa.&lt;br /&gt;&lt;br /&gt;Working on Visual C++ 2005 on a Windows Forms Applicacion:&lt;br /&gt;Trabajando en Visual C++ 2005 en una Aplicación de Windows Forms:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;  using namespace&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;using namespace &lt;/span&gt;System::ComponentModel;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;using namespace &lt;/span&gt;System::Collections;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;using namespace&lt;/span&gt; System::Windows::Forms;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;   using namespace &lt;/span&gt;System::Data;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; using namespace &lt;/span&gt;System::Drawing;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;Personalized structure/Estructura personalizada&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;//We create the structure. Se crea la estructura.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;struct &lt;/span&gt;estructura{&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; int&lt;/span&gt; unidadesvalorativas;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; char &lt;/span&gt;nombredelamateria[50];&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;char &lt;/span&gt;nombredelalumno[50];&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;char&lt;/span&gt; nombredeldocente[50];&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; int &lt;/span&gt;ciclo;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; int &lt;/span&gt;ano;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; double &lt;/span&gt;notafinal;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; int &lt;/span&gt;asistenciafinal;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;int&lt;/span&gt; matricula;&lt;br /&gt;};&lt;br /&gt;estructura a, b;&lt;span style="color: rgb(0, 153, 0);"&gt;//We declare variables "a" and "b" from type "estructura", which is a personalized class or structure created right above.  Se deblaran las variables "a" y "b" del tipo "estructura", que es una clase (class) o estructura (structure) personalizada que se acaba de crear anteriormente.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-weight: bold;"&gt;Code for button1/Código para el button1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;private&lt;/span&gt;: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                &lt;span style="color: rgb(0, 153, 0);"&gt; //This For is to fill with blank spaces all of the values in the Char arrays so that they don't save values from former processes. Con este For se llenan de espacios en blanco todos los valores de los arreglos Char para que no queden valores de procesos anteriores. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 &lt;span style="color: rgb(51, 51, 255);"&gt;for&lt;/span&gt;(&lt;span style="color: rgb(51, 51, 255);"&gt;int&lt;/span&gt; i=0;i&amp;lt;50;i++){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                     a.nombredelamateria[i]=&lt;span style="color: rgb(153, 51, 0);"&gt;' '&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                     a.nombredelalumno[i]=&lt;span style="color: rgb(153, 0, 0);"&gt;' '&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                     a.nombredeldocente[i]=&lt;span style="color: rgb(153, 0, 0);"&gt;' '&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 &lt;span style="color: rgb(0, 153, 0);"&gt;//Introduce values to the structure from values introduces by the user on the textBox spaces. Introduce valores a la estructura desde los valores introducidos por el usuario en los textBox.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 a.unidadesvalorativas=System::Convert::ToInt32(textBox1-&amp;gt;Text);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                &lt;span style="color: rgb(51, 51, 255);"&gt; for&lt;/span&gt;(&lt;span style="color: rgb(51, 51, 255);"&gt;int&lt;/span&gt; i=0;i&amp;lt;textBox2-&amp;gt;Text-&amp;gt;Length;i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                     a.nombredelamateria[i] = textBox2-&amp;gt;Text[i];    &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 &lt;span style="color: rgb(51, 51, 255);"&gt; for&lt;/span&gt;(&lt;span style="color: rgb(51, 51, 255);"&gt;int &lt;/span&gt;i=0;i&lt;textbox3-&amp;~~special_remove!#~~gt;text-&amp;~~special_remove!#~~gt;length;i++)&gt;&lt;/textbox3-&amp;~~special_remove!#~~gt;text-&amp;~~special_remove!#~~gt;length;i++)&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                     a.nombredelalumno[i]=textBox3-&amp;gt;Text[i];&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 &lt;span style="color: rgb(51, 51, 255);"&gt;for&lt;/span&gt;(&lt;span style="color: rgb(51, 51, 255);"&gt;int&lt;/span&gt; i=0;i&amp;lt;textBox4-&amp;gt;Text-&amp;gt;Length;i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                     a.nombredeldocente[i]=textBox4-&amp;gt;Text[i];&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 a.ciclo=System::Convert::ToInt32(textBox5-&amp;gt;Text);&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;//This line is not inside our "for" cycle anymore. Esta línea ya no está dentro del ciclo "for".&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 a.ano=System::Convert::ToInt32(textBox6-&amp;gt;Text);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 a.notafinal=System::Convert::ToDouble(textBox7-&amp;gt;Text);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 a.asistenciafinal=System::Convert::ToInt32(textBox8-&amp;gt;Text);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 a.matricula=System::Convert::ToInt32(textBox9-&amp;gt;Text);    &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 &lt;span style="color: rgb(0, 153, 0);"&gt;//All what is in a structure is sent to b structure. Todo lo que hay en la estructura a lo manda a otra estructura llamada b.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 b=a;                                                              &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;             }&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-weight: bold;"&gt;Code for button2/Código para el button2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;private&lt;/span&gt;: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            &lt;span style="color: rgb(0, 153, 0);"&gt; //It takes values from the structure to print them out on textBox spaces. Toma valores de la estructura y los imprime en los textBox.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            textBox10-&amp;gt;Text=String::Format(&lt;span style="color: rgb(153, 0, 0);"&gt;"{0}"&lt;/span&gt;,b.unidadesvalorativas);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            textBox11-&amp;gt;Text=&lt;span style="color: rgb(153, 0, 0);"&gt;""&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; i = 0 ; i&amp;lt; 50; i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 textBox11-&amp;gt;Text += Char::ToString(b.nombredelamateria[i]);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            textBox12-&amp;gt;Text=&lt;span style="color: rgb(153, 0, 0);"&gt;""&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;//This line is not inside our "for" cycle anymore. Esta línea ya no está dentro del ciclo "for".&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; i = 0 ; i&amp;lt; 50; i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 textBox12-&amp;gt;Text += Char::ToString(b.nombredelalumno[i]);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            textBox13-&amp;gt;Text=&lt;span style="color: rgb(153, 0, 0);"&gt;""&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;//This line is not inside our "for" cycle anymore. Esta línea ya no está dentro del ciclo "for".&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; i = 0 ; i&amp;lt; 50; i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                 textBox13-&amp;gt;Text += Char::ToString(b.nombredeldocente[i]);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            textBox14-&amp;gt;Text=String::Format(&lt;span style="color: rgb(153, 0, 0);"&gt;"{0}"&lt;/span&gt;,b.ciclo);&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;//This line is not inside our "for" cycle anymore. Esta línea ya no está dentro del ciclo "for".&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            textBox15-&amp;gt;Text=String::Format(&lt;span style="color: rgb(153, 0, 0);"&gt;"{0}"&lt;/span&gt;,b.ano);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            textBox16-&amp;gt;Text=String::Format(&lt;span style="color: rgb(153, 0, 0);"&gt;"{0}"&lt;/span&gt;,b.notafinal);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            textBox17-&amp;gt;Text=String::Format(&lt;span style="color: rgb(153, 0, 0);"&gt;"{0}"&lt;/span&gt;,b.asistenciafinal);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            textBox18-&amp;gt;Text=String::Format(&lt;span style="color: rgb(153, 0, 0);"&gt;"{0}"&lt;/span&gt;,b.matricula);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;br /&gt;&lt;br /&gt;Jaime Montoya&lt;br /&gt;webmaster@jaimemontoya.com&lt;br /&gt;&lt;a href="http://www.jaimemontoya.com/"&gt;www.jaimemontoya.com&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574451814120321633-472886391767921557?l=structuresintcharstringvcmasmas2005.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://structuresintcharstringvcmasmas2005.blogspot.com/feeds/472886391767921557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574451814120321633&amp;postID=472886391767921557' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574451814120321633/posts/default/472886391767921557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574451814120321633/posts/default/472886391767921557'/><link rel='alternate' type='text/html' href='http://structuresintcharstringvcmasmas2005.blogspot.com/2007/05/structures-int-char-string-types-on-c.html' title='Structures, Int, Char, String types on C++ 2005'/><author><name>Jaime Montoya</name><uri>http://www.blogger.com/profile/16823894261113468942</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/_xxqD9isjXyY/S6xjpG1cqfI/AAAAAAAAO18/D6l_ssNuNNA/S220/jaimemontoya.jpg'/></author><thr:total>1</thr:total></entry></feed>
