28 Jan,2013


Today i read DXF specifications for entities,line and circle from

                            http://images.autodesk.com

File Handling

Today I learn file handling in C++ from

                          http://www.cplusplus.com/doc/tutorial/files/

g++ Compiler

I installed g++ compiler to run C++ programs by running following command on the terminal.

               $sudo apt-get install g++

Steps to compile and execute C++ program

1.Create a C++ program in editor “gedit” and save as filename.cpp.

Program: filename.cpp

#include<iostream>

using namespace std;

int main()

{

cout<<“\n It’s my first Program”;

return 0;

}

2.Open a terminal and compile a program.

          $g++ filename.cpp -o filename.o

Here, filename.cpp is input program

          filename.o is output file

3. Execute a program

              $./filename.o

Now,you can see the output on the terminal

 It’s my first Program

 

I made a file in C++ which can draw line and circle.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s