Você está na página 1de 8

How to USE C++ AND PROGRAMMING SYSTEM.

1.First use the software C++ to run the program.

2.Second select new source file to use it. It will be blank file

3. Write the program and it will be complete on the file.

4. And then run the program. After you finish it.

Compiling single file...


--------

5. Save the file as untitle.

- Filename: C:\Users\Pelajar\Desktop\C++ MN
2015.cpp
- Compiler Name: TDM-GCC 4.8.1 64-bit Release

Processing C++ source file...


-------- C++ Compiler: C:\Program Files (x86)\DevCpp\MinGW64\bin\g++.exe
- Command: g++.exe "C:\Users\Pelajar\Desktop\C++
MN 2015.cpp" -o "C:\Users\Pelajar\Desktop\C++ MN
2015.exe" -I"C:\Program Files (x86)\DevCpp\MinGW64\include" -I"C:\Program Files (x86)\DevCpp\MinGW64\x86_64-w64-mingw32\include"
-L"C:\Program Files (x86)\Dev-Cpp\MinGW64\lib"
-L"C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64w64-mingw32\lib" -static-libgcc
C:/Program Files (x86)/DevCpp/MinGW64/bin/../lib/gcc/x86_64-w64mingw32/4.9.2/../../../../x86_64-w64mingw32/bin/ld.exe: cannot open output file
C:\Users\Pelajar\Desktop\C++ MN 2015.exe:
Permission denied
collect2.exe: error: ld returned 1 exit status

Compilation results...

6.Compilation Process.
--------

- Errors: 1
- Warnings: 0
- Output Filename: C:\Users\Pelajar\Desktop\C++ MN
2015.exe

7. Excute the program.

8. Insert the data .

9. The result.

QUESTION
1. How to
a. Compilation process

Compiling a source code file in C++ is a four-step process. For


example, if you have a C++ source code file named prog1.cpp and
you execute the compile command
g++ -Wall -ansi -o prog1 prog1.cpp

the compilation process looks like this:


1. The C++ processor copies the contents of the included
header files into the source code file, generates macro code,
and replaces symbolic constants defined using #define with
their values.
2. The expanded source code file produced by the C++
processor is compiled into the assembly language for the
platform.
3. The assembler code generated by the compiler is assembled
into the object code for the platform.
4. The object code file generated by the assembler is linked
together with the object code files for any library functions
used to produce an executable file.

b. Excute the program.


This versatile Windows API function is probably your best bet when
you want to launch a program. It lets you control important facets of the
program's operation, such as whether its window is to be normal size,
minimized, or even hidden at start up. You can pass any number of
parameters -- filenames, switches, and options -- to the program and you
can select the default (working) directory for the program.

But the most important feature is that ShellExecute can launch


documents. It is aware of Windows' file type associations and given a
verb, such as "open" or "print" and the filename of a document, it will
open that document using the appropriate program. For instance, to

display a PDF file, you do not need to know whether to launch Acrobat.Exe
or AcroRd32.Exe or where the right executable is stored. You simply
launch the document. The current user's file-type associations are
queried and the right program is started with the right parameters to
make it do what's expected.

2. What is C++ programming.

It was designed with a bias toward system programming and embedded, resource-constrained
and large systems, with performance, efficiency and flexibility of use as its design highlights. [3] C+
+ has also been found useful in many other contexts, with key strengths being software
infrastructure and resource-constrained applications,[3] including desktop applications, servers
(e.g. e-commerce, web search or SQL servers), performance-critical applications (e.g. telephone
switches or space probes), and entertainment software.[4] C++ is a compiled language, with
implementations of it available on many platforms and provided by various organizations,
including the FSF, LLVM, Microsoft, Intel and IBM.
C++ is standardized by the International Organization for Standardization (ISO), with the latest
(and current) standard version ratified and published by ISO in December 2014 as ISO/IEC
14882:2014 (informally known asC++14).[5] The C++ programming language was initially
standardized in 1998 as ISO/IEC 14882:1998, which was then amended by the C++03, ISO/IEC
14882:2003, standard. The current C++14 standard supersedes these and C++11, with new
features and an enlarged standard library. Before the initial standardization in 1998, C++ was
developed by Bjarne Stroustrup at Bell Labs since 1979, as an extension of the C language as
he wanted an efficient and flexible language similar to C, which also provided high-level features
for program organization.

Conclsion.
I have learn to use DEV-C++ very well.

Você também pode gostar