Posts Tagged C++

Cum se scrie si se ruleaza cel mai simplu program C in Visual Studio 2013

Cel mai simplu program C nu face foarte multe. De fapt, poate sa nu faca nimic, insa in acest exemplu il vom scrie astfel incat sa afiseze clasicul Hello World !

Desi complexitatea programului este scazuta, sunt foarte multe de invatat din acest mic program:

  • care este structura unui program C sau C++
  • cum se ruleaza din Visual Studio 2013

Aceste elemente sunt esentiale pentru un viitor programator C/C++ deoarece pe ele se bazeaza restul de reguli. Read the rest of this entry »

,

No Comments

Cum sa deschizi un proiect C/C++ nou in Visual Studio 2013

 

Visual Studio 2013 este in momentul de fata ultima versiunea de cunoscutului mediu de dezvoltare (Itegrated Development Environment – IDE) de la Microsoft. El aduce o serie de imbunatatiri la nivel de editor, compilator si instrumente de dezvoltare care se vad inca din faza de deschidere a unui proiect nou.

Articolul prezinta pasii ce trebuie urmati pentru a deschide un proiect C/C++ nou, de tip consola, in Visual Studio 2013 Read the rest of this entry »

,

1 Comment

Utilizarea sirurilor de caractere in limbajul de programare C++

In limbajul de programare C++, un sir de caractere se defineste in doua moduri:

  • vector de caractere – zona de memorie de lungime prestabilita care se rezerva la momentul compilarii aplicatiei;
  • pointer – contine adresa de memorie unde se stocheaza sirul de caractere; de regula, aceasta zona de memorie este alocata la momentul executiei aplicatiei.

Read the rest of this entry »

, , ,

No Comments

How to skip C++ access modifiers – not real code security

C++ is not a pure object oriented programming language (this topic is just another argument) but it is implementing OOP concepts. On of these concepts is encapsulation: the object hides its contents (attributes or instance variables) by making them private / protected and gives access to them through public methods (like getters and setters).

Read the rest of this entry »

, ,

No Comments

How to: Transform a Mathematical Expression from Infix Writing to Postfix Writing in C++

Postfix writing (Reverse Polish Form) was made by Polish mathematician Jan Ɓukasiewicz. Particularities of this form of writing mathematical expressions are presented in [...].
An algorithm for transforming a writing mathematical expressions from infix to postfix writing was developed by Edsger Dijkstra (Dijkstra Shunting Algorithm).
Read the rest of this entry »

, , , ,

1 Comment

How to: Evaluate a Mathematical Expression in Postfix Writing in C++

Postfix writing [...] is a form of representation of mathematical expressions in which arithmetic operatorsare written specified by operands.
Advantages of postfix writing over prefix and infix writing:

  • Highlights clear policy of making operations;
  • Brackets for forcing priority for implementing operators are not necessary;
  • Evaluations are easily performed by computer.

Read the rest of this entry »

, , , ,

1 Comment

How to: Implement Operations on Stack and Queue Data Structures in C++

Stack is a logical data structure, its implementation in physical memory being made by using other data structures.
The components of the stack data structure have the same data type, which means that the stack is a homogeneous data structure.
There are two basic operations with stack: adding and removal of an item.
Manner of implementation for operations is given by the discipline of access: LIFO – Last In First Out.
All adds (push) and extractions (pop) are achieved at the same end of the implementation structure, called the stack top.
Read the rest of this entry »

, , , ,

2 Comments

How to: Create a DLL – Dynamic Link Library in C++ as Visual Studio 2008 Project

Using DLL ensure productivity and/or financial gain in the software development process by reusing the source code written C++. Routines and/or programming components included in a DLL are referenced in the application without the need of their re-implementation in these applications.
Read the rest of this entry »

, , , , , , , , ,

2 Comments

How to: Optimize the Memory Space by Heap Memory Allocation in C++

Memory allocation at the applications run-time enables the use of a storage space, expressed in number of bytes, having the size of heap memory required for data storing defined by the variables. Compile-time allocation allows the reservation and use of storage space with predefined size expressed in number of bytes. In this situation, software developers must anticipate the maximum size of memory space that can be used in the application.
Read the rest of this entry »

, , , , , , , , ,

No Comments

How to: Implement Arithmetic of Pointers in C++

In C++ programming language, memory areas can be accessed indirectly through pointer type variable [...]. Also, available with a memory address, it ensures movement on memory areas from the memory address stored in the variable pointer. This is ensured by arithmetic operators and it is called arithmetic of pointers.
Read the rest of this entry »

, , , , , , , , ,

1 Comment