Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
which situation we use stack.h and why we use stack.cpp
#1
The usual practice when writing C++ applications is to put the class declarations in a header file, with .h extension, and the function definitions in a source file, with .cpp extension.

The header file (.h) contains function prototypes, so another programmer can see what methods the class responds to, without having to worry about how the methods are implemented.

The source file (.cpp) contains the actual function definitions , placing the detailed code in a location isolated from the declarations in the header.

The cpp file has a #included statement that refers to the corresponding .h file.

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how stack operation proves costly during traversing a tree Vuhelper 0 1,519 01-04-2012, 10:43 PM
Last Post: Vuhelper
  what is the total meanings and use of the word "~stack();" and also the symbol of Vuhelper 0 2,564 11-05-2011, 05:08 PM
Last Post: Vuhelper
  stack during function call in C++ 2011 Vuhelper 0 2,032 11-05-2011, 05:05 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)