Posts Tagged C++

How to: Apply the Arithmetic of Pointers and Access the Areas of Heap Memory in C++

Areas of heap memory are accessed via variables of pointer type [...]. This kind of variable manages values of memory address type.
Arithmetic of pointers [...] involves the operators use to access the areas of heap memory. Allocating of heap memory areas is done by functions and/or operators implemented in programming language.
Read the rest of this entry »

, , , , , , , , , ,

No Comments

Conversia unei expresii matematice din scrierea infixata in scrierea postfixata in C++

Scrierea postfixata (forma poloneza inversa) a fost realizata de matematicianul de origine poloneza Jan Lukasiewicz. Particularitati ale acestei forme de scriere a expresiilor matematice sunt prezentate la [...].
Un algoritm de transformare a unei expresii matematice din scrierea infixata in scrierea postfixata a fost elaborat de Edsger Dijkstra (Dijkstra Shunting Algorithm).
Read the rest of this entry »

, , , ,

10 Comments

Structurile de date Stiva si Coada in C++

Stiva este o structura de date logica, implementarea sa din punct de vedere fizic fiind realizata prin utilizarea altor structuri de date.
Elementele componente ale structurii de tip stiva sunt de acelasi tip, ceea ce inseamna ca stiva este o structura de date omogena.
Exista doua operatii de baza cu structura de tip stiva: adaugarea si extragerea unui element. Modalitatea de implementare a operatiilor este data de disciplina de acces: LIFO – Last In First Out. Toate inserarile (push) si extragerile (pop) sunt realizate la acelasi capat al structurii de implementare, denumit varful stivei.
Read the rest of this entry »

, , , ,

2 Comments

Evaluarea unei expresii matematice in scrierea postfixata in C++

Scrierea postfixata (forma poloneza inversa) [...] este o forma de reprezentare a unei expresii matematice aritmetice in care operatorii sunt scrisi, specificati dupa operanzi.
Avantaje ale scrierii postfixate fata de scrierile prefixata si infixata:

  • Evidentierea clara a ordinii de efectuare a operatiilor;
  • Parantezele pentru fortarea prioritatii de aplicare a operatorilor nu mai sunt necesare;
  • Evaluarile sunt usor de efectuat cu ajutorul calculatorului.

Read the rest of this entry »

, , , ,

1 Comment

How to: Define and Use the Pointers Variables in C++

The pointer type variables allow the accessing of memory areas with numerical content for the management of the values which represent memory addresses. The dimension of a pointer variable depends on the processor architecture.
In the C++ programming language, the definition template of a pointer variable is:
Read the rest of this entry »

, , , , ,

2 Comments

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

The usage of the programming elements included in DLL’s [...] it is made in C++ applications by respecting the rules stated below.
The usage of a DLL in the C++ programming language in the Visual Studio programming environment, it is made in the following way:

  • Create a C++ project – type: Console application;
  • Define the content for the source file which uses elements included in the DLL;
  • Create the executable file.

Read the rest of this entry »

, , , ,

4 Comments

How to: Implement a Sparse Matrix Data Structure in C++ Using Simple Linked List

The storage structures for sparse matrixes are presented at [...].
The simply linked list is a linear data structure, formed by elements called nodes. A node is composed by two categories of fields:

  • The field with the information necessary for processing;
  • The field with the information for connecting with the successor node in the simply linked list type structure; it is defined as a pointer to the structure of the node in order to retain the address of the next node in the simply linked list.

Read the rest of this entry »

, , , ,

1 Comment

How to: Implement Sparse Matrix Data Structure in C++ Using Array

The sparse matrix represents a special type of two-dimensional array consisting of a large number of elements from out of which a very high proportion is occupied by null elements. Thus, the classical declaration of a two-dimensional array in the C++ programming language leads to unnecessary use of memory by storing null values and of the processing capacity.
Read the rest of this entry »

, , , , ,

3 Comments

Implementarea structurii de date Matrice Rara in C++ utilizand lista simplu inlantuita

Structurile de stocare a matricelor rare sunt prezentate la [...].
Lista simpla este o structura de date liniara, formata din elemente denumite noduri. Un nod este compus din doua categorii de campuri:

  • Campul cu informatia necesara prelucrarii;
  • Campul cu informatia de legatura cu nodul succesor in cadrul structurii de tip lista simpla; se defineste sub forma de pointer catre structura nodului pentru a retine adresa nodului care urmeaza in cadrul listei simple.

Read the rest of this entry »

, , , ,

2 Comments

Implementarea structurii de date Matrice Rara in C++ utilizand masive de date

Matricea rara reprezinta in tip special de masiv dimensional format dintr-un numar foarte mare de elemente din care o pondere foarte mare o ocupa elementele nule. Astfel, declararea clasica a unui masiv bidimensional in limbajul C++ conduce la utilizarea inutila a memoriei prin stocarea valorilor nule si a capacitatii de procesare.
Read the rest of this entry »

, , , , ,

1 Comment