<?xml version="1.0" encoding="UTF-8"?><rss version="2.0">
<channel>
<title>Compiler</title>
<link>http://www.computersight.com/tags/Compiler</link>
<description>New posts about Compiler</description>
<item>
<title>Installing Turbo C</title>
<link>http://www.computersight.com/Programming/C++/Installing-Turbo-C.156407</link>
<description>
<![CDATA[<p>Turboc.exe is the editor (compiler) used by the programming languages like C and C++. Turboc.exe is the setup file which is available for free download on the internet. To download the file, simply search for &amp;ldquo;Turboc.exe&amp;rdquo; on google, or any other search engine. Once you get the file, next step is to install it. To install Turboc, follow these steps:</p>
<h3>Steps</h3>
<ol>
<li>
<p>Place the turboc.exe file in the folder, where you want to install it. For eg: I'll place it in C:TC</p>
</li>
<li>
<p>Double click on the file turboc.exe.</p>
</li>
<li>
<p>A Command prompt window will open up.</p>
</li>
<li>
<p>At one point, you will be prompted to overwrite files. Press A.</p>
</li>
<li>
<p>Now, once the window closes, locate the file TC.exe and double click it.</p>
</li>
<li>
<p>The turboc editor will open up, and you will get two errors &amp;ldquo;File /directory not found&amp;rdquo;.</p>
</li>
<li>
<p>Press OK for both the errors.</p>
</li>
<li>
<p>Now go to Options-&amp;gt;Directories</p>
</li>
<li>
<p>Set the Include directories path to the location where you placed Turboc.exe (in my case,C:TC)</p>
</li>
<li>
<p>Do the same for Library directories.</p>
</li>
<li>
<p>Optionally, set the output location. The .OBJ and the .EXE files produced as output will get saved at this location.</p>
</li>
<li>
<p>Exit the editor, and restart it.</p>
</li>
<li>
<p>You are done with it&amp;hellip;</p>
</li>
</ol>
<p>Happy programming&amp;hellip;</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FC%2B%2B%2FInstalling-Turbo-C.156407"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FC%2B%2B%2FInstalling-Turbo-C.156407" border="0"/></a>]]></description>
<pubDate>Thu, 03 Jul 2008 08:42:52 PST</pubDate></item>
<item>
<title>C++ Tutorial 2</title>
<link>http://www.computersight.com/Programming/C++/C-Tutorial-2.39879</link>
<description>
<![CDATA[<p>Have you ever wanted to open a file through a C++ program? Well now you can! The process is simple. All you need to do is:</p>
 <p><ul>
  <li> Include the windows.h library. <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/35969_0.jpg" />  </li>
 
  <li> Use the following function: <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/35969_1.jpg" />  </li>
 </ul></p>


 
<h3>So, here is the complete code to open “file.exe”:</h3>


 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/35969_2.jpg" /></p>

 
<h3>Here is the complete code to open “WordDocument.doc”:</h3>


 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/35969_3.jpg" /></p>

 <p>Ok, so you know how to open files, but what if you want to open a folder?</p>


<h3> You would do this:</h3>


 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/35969_4.jpg" /></p>
 
 
<h3>Now, let's open a website:</h3>


 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/35969_5.jpg" /></p>
 
 
 <p>Yay! Now you know how to open files, folders, and websites through C++ programs!</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FC%2B%2B%2FC-Tutorial-2.39879"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FC%2B%2B%2FC-Tutorial-2.39879" border="0"/></a>]]></description>
<pubDate>Tue, 12 Jun 2007 03:47:38 PST</pubDate></item>
<item>
<title>Message Boxes in C++</title>
<link>http://www.computersight.com/Programming/C++/Message-Boxes-in-C.39895</link>
<description>
<![CDATA[<p><strong>Note:</strong> The following is for people who already know C++.</p>

 <p> In case you don't know what message boxes are, here are some examples:</p>
 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_0.jpg" /></p>
 
 <H3>There are only two things needed to create Message Boxes:</H3>

<P><OL> <li> Include the “windows.h” library: <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_1.jpg" /></LI>
 <li> Use this function :  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_2.jpg" /> </LI></OL></P>
 
 <H3>So, here is the complete code to generate a message box:</H3>

 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_3.jpg" /></p>

 <H3>The above code generates this message box:</H3>

 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_4.jpg" /></p>

 
 <p>Simple… right? But what does the “MB_OK” mean? All it does is tell the Message Box to make a button that says “OK.” You can make the button on the Message Box say different things.</P>
 <H3> Here is the complete list:</H3>
<P><UL><LI>MB_ABORTRETRYIGNORE</LI>
 <LI>MB_CANCELTRYCONTINUE</LI>
 <LI>MB_HELP</LI>
 <LI>MB_OK</LI>
 <LI>MB_OKCANCEL</LI>
 <LI>MB_RETRYCANCEL</LI>
 <LI>MB_YESNO</IL>
 <LI>MB_YESNOCANCEL</IL></UL></P>

 <p>	Go ahead! Try them! Replace the part in the code that say “MB_OK” with any of these and see what you get! Try them all!</p>


 <p>Ok, so now you know how to make buttons. But what about the icons like these?: <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_5.jpg" />? To make them, you add any of these:</p>
 <P><UL><LI>MB_ICONEXCLAMATION: <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_6.jpg" /></LI>
 <LI>MB_ICONWARNING: <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_7.jpg" /></LI>
 <LI>MB_ICONINFORMATION: <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_8.jpg" /></LI>
 <LI>MB_ICONASTERISK: <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_9.jpg" /></LI>
 <LI>MB_ICONQUESTION: <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_10.jpg" /></LI>
 <LI>MB_ICONSTOP: <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_11.jpg" /></LI>
 <LI>MB_ICONERROR: <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_12.jpg" /></LI>
 <LI>MB_ICONHAND: <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_13.jpg" /></LI></UL></P>

 <H3>Here is an example of a Message Box with icons:></H3>

 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_14.jpg" /></p>


 <H3>The above code generates this Message Box:</H3>

 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_15.jpg" /></p>
 
 <p>But what if you want to make a combination of buttons with icons? What if you want MB_YESNO as the button and MB_ICONERROR as the icon? The answer is simple, you would use “MB_YESNO | MB_ICONERROR”. </P>
 <H3>Here is an example:</H3>

 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_16.jpg" /></p>

 <H3>The above code generates the following Message Box:</H3>

 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_17.jpg" /></p>

 
 <p>Yay, now you know how to create Message Boxes but how do you know if they press a button in the Message Box?</P>
 <H3> Here is an example of how you check:</H3>
 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/34080_18.jpg" /></p>

 <p>As you can see, the code Checks if you clicked the button yes (shown as IDYES) and writes “you pressed yes.” If you clicked no, it writes “you pressed no.” here is the list of the possible buttons.</p>
 <P><UL><LI>IDABORT:      Checks if you pressed the button “Abort”</LI>
 <LI>IDCANCEL:     Checks if you pressed the button “Cancel”</IL>
 <LI>IDCONTINUE:	 Checks if you pressed the button “Continue”</LI>
 <LI>IDIGNORE:   Checks if you pressed the button “ignore”</LI>
 <LI>IDNO:               (Checks if you pressed the button “No”</LI>
 <LI>IDOK:	   Checks if you pressed the button “OK”</LI>
 <LI>IDRETRY:    Checks if you pressed the button “Retry”</LI>
 <LI>IDTRYAGAIN:	  Checks if you pressed the button “Try Again”</LI>
 <LI>IDYES:	   Checks if you pressed the button “Yes”</LI></UL></P>
 
 <p>Yay, you are now an expert with using Message Boxes. I hope you liked this tutorial!</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FC%2B%2B%2FMessage-Boxes-in-C.39895"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FC%2B%2B%2FMessage-Boxes-in-C.39895" border="0"/></a>]]></description>
<pubDate>Sat, 02 Jun 2007 05:02:13 PST</pubDate></item>
<item>
<title>C++ Tutorial One</title>
<link>http://www.computersight.com/Programming/C++/C-Tutorial-One.39840</link>
<description>
<![CDATA[<p>Welcome to my first C++ tutorial!</p>
 
 <p>This tutorial will teach you the very basics of programming in C++.  </p>
 
 <p>So, what <strong>are</strong> the very basics of C++? In this tutorial, you will learn input and output.</p>
 
 <p>Input is when you give information to the computer. An example is when you move your computer mouse. If you move it to the left, you are telling the computer to move the clicker on the screen to the left.</p>
 
 <p>Output is when the computer gives information to you. The computer is always outputting information to you. Examples are text, pictures, videos, or music. You get the point...</p>
 
 
<h3>NOW WE START PROGRAMMING!</h3>


        
<h3>Input:</h3>

 
 <p><ul>
  <li> First download DevCpp (http://www.bloodshed.net/dev/devcpp.html).  </li>
 
  <li> It should look like this:  </li>
 </ul></p>
 
 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/23322_0.jpg" /></p>
 
 <p><ul>
  <li> Now go to: File/New/Source File.  </li>
 
  <li> Write this in the text area:  </li>
 </ul></p>
 
 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/23322_1.jpg" /></p>
 
 <p><ul>
  <li> Go to: Execute/Compile and Run.  </li>
 
  <li> Save the file wherever you want.  </li>
 
  <li> Wait a while until the program compiles  </li>
 
  <li> You should get something like this:  </li>
 </ul></p>
 
 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/23322_2.jpg" /></p>
 
 
 <p>At first sight, the code looks very intimidating, but it's not complicated. If we take off all the comments, it looks like this:</p>
 
 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/23322_3.jpg" /></p>
 
 <p>That isn't that bad... Right? But what does it mean?</p>
 
 <p>The first two lines are libraries. A library is already-made code that makes it easier for us to program. Using libraries lets us program with very little code. If we didn't use libraries, it would take 50 more times of code to program.</p>
 
 <p>The fifth line is where the main code goes. Just imagine it like this:</p>
 
 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/23322_4.jpg" /></p>
 
 <p>The seventh line prints out “hello world” onto the screen. This code uses the first library (<img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/23322_5.jpg" />) and would not work without it.</p>
 
 <p>The eighth line waits for any key to be pressed and the program doesn't do anything until a key is pressed. This code uses the second library (<img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/23322_6.jpg" />) and would not work without it.</p>
 
 <p>The ninth line ends the program.</p>
 
 
 
 <p>So, now that you learned output, it's time to learn input.</p>



<h3>Output:</h3>

 
 <p><ul>
  <li> Replace the first program with:  </li>
 </ul></p>
 
 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/23322_7.jpg" /></p>
 
 <p><ul>
  <li> Go to: Execute/Compile.  </li>
 
  <li> Wait a while until the program compiles.  </li>
 
  <li> It should look something like this:  </li>
 </ul></p>
 
 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/23322_8.jpg" /></p>
 
 <p>Since you already know what most of the program does, I will just explain the new parts added.</p>
 
 <p>The seventh line declares a variable “number”. This variable is declared as an integer and it can be used to store any integer value like 3, 1024, 4, -56, -93, or -1000.</p>
 
 <p>The ninth line waits for you to type in any integer and waits for you to press enter. Whatever integer you type will be stored into the variable “number”.</p>
 
 <p>The tenth line types in the value of “number” and then continues on by saying “is also my favorite number”. The value of “number”, as I said before, will be whatever you typed as your favorite number.</p>

 <p>So let's assume that you said your favorite number was 15. The program would say “15 is also my favorite number!”</p>
 
 <p>That is the end of this tutorial. I hope you learned a lot about input and output. Try messing around with the code and see what you get.</p>
 
 
 <h3>Pop Quiz!</h3>
 
 <p>Write a program that does the following:</p>
 
 <p><img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/23322_9.jpg" /></p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FC%2B%2B%2FC-Tutorial-One.39840"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FC%2B%2B%2FC-Tutorial-One.39840" border="0"/></a>]]></description>
<pubDate>Sun, 01 Apr 2007 08:27:32 PST</pubDate></item>
<item>
<title>Compiler Vs Interpreter</title>
<link>http://www.computersight.com/Programming/Compiler-Vs-Interpreter.39629</link>
<description>
<![CDATA[<h3>Compiler</h3>

<p>A compiler is a program that translates program (called source code) written in some high level language into object code. The compiler derives its name from the way it works, looking at the entire piece of source code and collecting and reorganizing the instructions. A compiler translates high-level instructions directly into machine language and this process is called compiling.</p>

<h3>Interpreter</h3>

<p>An interpreter translates high-level instructions into an intermediate form, which it then executes. Interpreter analyzes and executes each line of source code in succession, without looking at the entire program; the advantage of interpreters is that they can execute a program immediately. Compilers require some time before an executable program emerges. However, programs produced by compilers run much faster than the same programs executed by an interpreter.</p>

<p>Compiled programs generally run faster than interpreted programs. The advantage of an interpreter, however, is that it does not need to get through the compilation stage during which machine instructions are generated. This process can be time-consuming if the program is long. The interpreter, on the other hand, can immediately execute high-level programs. For this reason, interpreters are sometimes used during the development of a program, when a programmer wants to add small sections at a time and test them quickly.</p>

<p>Because compilers translate source code into object code, which is unique for each type of computer, many compilers are available for the same language. For example, there is a C compiler for PCs and another for Unix computers. </p>

<h3>Compile</h3>

<p>Compiling is a process of transforming a program written in a high-level programming language from source code into object code. Programmers write programs in a form called source code. Source code must go through several steps before it becomes an executable program. The first step is to pass the source code through a compiler, which translates the high-level language instructions in the source code follow its syntax rules. If not it will inform the programmer where rules have been violated. </p>

<p>The final step in producing an executable program –after the compiler has produced object code - is to pass the object code through a linker. The linker combines molecules (different program segments) and gives real values to all symbolic addresses (memory locations), thereby producing machine code.</p>

<h3>Source code</h3>

<p>Program written in a particular programming language in its original form is called source code (program). The word source differentiates code from various other forms that it can have (for example, object code and executable code). To execute the program, however, the programmer must translate it into machine language. The compiler translates the source code into a form called object code. Source code is the only format that s readable by humans. When we purchase programs, we usually receive them in their machine-language format. This means that we can execute them directly, but cannot read or modify them. </p>

<h3>Object code</h3>

<p>Object code is the code produced by a compiler. Object code is often the same as or similar to a computer’s machine language. The final step in producing an executable program is to transform the object code into machine languages, if it is not already in this form. A program called linker does this job.</p>

<h3>Liveware</h3>
	
<p>Liveware refers to all personnel who deals with the computer and its management.</p>
<p>Example:
<ul>
<li>Hardware Maintenance Engineer</li>
<li>Software Engineer</li>
<li>System Analyst</li>
<li>Programmer</li>
<li>Data Operator</li>
<li>Computer Technicians</li>
</ul>
</p>
<h3>Firmware</h3>

<p>This is the term given to in-built programs of the computer, which give instructions to the computer. It is placed within computer systems at the time of manufacturing. ROM can be taken as firmware, which is hardware-containing software to control the computer software. Firmware is a hardware and a software in one.</p>



<a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FCompiler-Vs-Interpreter.39629"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FCompiler-Vs-Interpreter.39629" border="0"/></a>]]></description>
<pubDate>Wed, 05 Jul 2006 22:03:58 PST</pubDate></item>
</channel>
</rss>
