Click here to Skip to main content
16,006,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: AfxBeginThread Pin
Burl D22-Jul-03 10:23
Burl D22-Jul-03 10:23 
GeneralRe: AfxBeginThread Pin
Nitron22-Jul-03 10:11
Nitron22-Jul-03 10:11 
GeneralRe: AfxBeginThread - edited Pin
Tom Archer22-Jul-03 10:13
Tom Archer22-Jul-03 10:13 
GeneralAfxBeginThread The Code I Use... Pin
adonisv22-Jul-03 12:53
adonisv22-Jul-03 12:53 
GeneralRe: AfxBeginThread The Code I Use... Pin
Tom Archer22-Jul-03 13:11
Tom Archer22-Jul-03 13:11 
Generalconverting to ASCII Pin
IT_student22-Jul-03 9:26
IT_student22-Jul-03 9:26 
GeneralRe: converting to ASCII Pin
Alexander M.,22-Jul-03 9:29
Alexander M.,22-Jul-03 9:29 
GeneralC++ Programming Pin
tincup2322-Jul-03 9:24
tincup2322-Jul-03 9:24 
Hi I'm new to C++ programming, I would like to know if the below information could be done? If so, how and what would the coding look like?

C++ Dive Log Page Program:

Create a class DiveLogPage, along with a main routine to create & manipulate instances of DiveLogPage (manipulating them enough to “prove” that the class works properly) Provide the following member functions: constructor function ( with dialog, as described below), >><<, and displayDiveLogPage. Note that >> and << should be “symmetrical” (i.e. you should be able to read back what was written). The displayDiveLogPage member function should do a “pretty / reasonable” display of the DiveLogPage (i.e., display the various data members on the screen with headers).

A dive log consists of an entry for each dive that diver has made. Our dive log entries (i.e.., our DiveLogPage) will consist of the following items: dive number, start time, stop time, bottom time, average depth, maximum depth, starting tank pressure, and ending tank pressure. Data types for these items are shown in the table below.

integer dive number, average depth, maximum depth, starting tank pressure, ending tank pressure
Time start time, stop time, bottom time

The DiveLogPage constructor function should begin a dialog to get “most” of the items from the user( i.e.., user input prompts and input statement) Get the following items directly from the user: start time, stop time, average depth, maximum depth, starting tank pressure, and ending tank pressure. Data validation is required as follow: stop time > start time, maximum depth >= average depth, ending tank pressure < starting tank pressure. You should then calculate the bottom time (as stop time-start time). The class should maintain a static variable to set the dive number for the user (i.e.., first dive entered is dive number 1, second dive entered is dive number 2, etc...). Note that when reading a dive log from a file you must make sure that dive number is properly set as the user may create more DiveLogPages.

Create an array of 5 DiveLogPages. The main routine should be menu-driven, giving the user the following options:
0: quit
1: make an entry in the dive log
2: correct an entry it the dive log
3: display the current dive log
4: write the current dive log to file
5: read a dive log from a file

The “correct an entry in the dive log” option should first get the dive number for the entry that the user wants to change, and then display the following menu:
0: done making changes
1: change start time
2: change stop time
3: change average depth
4: change maximum depth
5: change starting tank pressure
6: change ending tank pressure

Instead of an array of 5 DiveLogPages, use dynamic allocation to allow user to create as many DiveLogPages as they want.

Divers generally store text information as well as numeric. Add 2 fields: dive site and dive notes. Dive sites should store up to 25 characters (including blanks), and notes should store up to 100 characters (including blanks). Get these values from the user as part of the constructor function dialog. Include options to correct the fields (under “correct an entry in the dive log”), but you only need to allow the user to replace them, not edit them.


C++ Newbie
GeneralRe: C++ Programming Pin
Maximilien22-Jul-03 10:15
Maximilien22-Jul-03 10:15 
GeneralRe: C++ Programming Pin
Nitron22-Jul-03 10:25
Nitron22-Jul-03 10:25 
GeneralRe: C++ Programming Pin
Michael P Butler22-Jul-03 11:18
Michael P Butler22-Jul-03 11:18 
GeneralRe: C++ Programming Pin
Tom Archer22-Jul-03 13:20
Tom Archer22-Jul-03 13:20 
GeneralRe: C++ Programming Pin
Nick Parker23-Jul-03 6:56
protectorNick Parker23-Jul-03 6:56 
GeneralGray Scale values displayed as Color Pin
Nirav Thakkar22-Jul-03 8:37
Nirav Thakkar22-Jul-03 8:37 
GeneralRe: Gray Scale values displayed as Color Pin
QuiJohn22-Jul-03 9:00
QuiJohn22-Jul-03 9:00 
Questionhow to reverse play MSDV avi file? Pin
Brian JR22-Jul-03 7:38
Brian JR22-Jul-03 7:38 
AnswerRe: how to reverse play MSDV avi file? Pin
Alexander M.,22-Jul-03 9:19
Alexander M.,22-Jul-03 9:19 
GeneralRe: how to reverse play MSDV avi file? Pin
Brian JR22-Jul-03 19:40
Brian JR22-Jul-03 19:40 
GeneralHELP! VC++/ADO connect & open .mdb problem Pin
ATC22-Jul-03 6:33
ATC22-Jul-03 6:33 
GeneralRe: HELP! VC++/ADO connect &amp; open .mdb problem Pin
Toni7822-Jul-03 8:47
Toni7822-Jul-03 8:47 
GeneralRe: We can not use upload/download Pin
ATC22-Jul-03 11:02
ATC22-Jul-03 11:02 
GeneralRe: We can not use upload/download Pin
Toni7822-Jul-03 11:17
Toni7822-Jul-03 11:17 
GeneralRe: HELP! VC++/ADO connect &amp; open .mdb problem Pin
Alexander M.,22-Jul-03 9:33
Alexander M.,22-Jul-03 9:33 
GeneralRe: Is there anyway to access directly? Pin
ATC22-Jul-03 11:03
ATC22-Jul-03 11:03 
GeneralRe: Is there anyway to access directly? Pin
Alexander M.,23-Jul-03 2:11
Alexander M.,23-Jul-03 2:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.