Click here to Skip to main content
15,919,423 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can autosize last coloumn of ListCtrl ? Pin
Le@rner12-Oct-08 18:31
Le@rner12-Oct-08 18:31 
GeneralRe: How can autosize last coloumn of ListCtrl ? Pin
David Crow13-Oct-08 2:55
David Crow13-Oct-08 2:55 
QuestionPrintPreview of a CImage Pin
Priya_Sundar8-Oct-08 18:23
Priya_Sundar8-Oct-08 18:23 
QuestionA button accepts files Pin
akira328-Oct-08 18:08
akira328-Oct-08 18:08 
AnswerRe: A button accepts files Pin
Naveen8-Oct-08 18:59
Naveen8-Oct-08 18:59 
Question_set_new_handler Pin
dharani8-Oct-08 17:56
dharani8-Oct-08 17:56 
AnswerRe: _set_new_handler Pin
Jijo.Raj8-Oct-08 18:17
Jijo.Raj8-Oct-08 18:17 
QuestionHelp With A Program. I Dont Know Where To Begin. PLZ HELP ME Pin
LilKoopa8-Oct-08 9:26
LilKoopa8-Oct-08 9:26 
Ok, I have to do 3 programs for school and I am completely lost on how to start either of them off. If somebody could help me I would greatly appreciate it. Here is the info about the programs.


1. Population
Create a New Project called YourLastnamePopulation.

In a population, the birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data:
· The starting size of a population
· The annual birth rate
· The annual death rate
· The number of years to display
Write a function that calculates the size of the population for a year. The formula is
N = P + BP + DP
Where N is the new population size, P is the previous population size, B is the birth rate, and D is the death rate.

Input Validation: Do not accept numbers less than 2 for the starting size. Do not accept negative numbers for birth rate or death rate. Do not accept numbers less than 1 for the number of years.

2. Lowest Score Drop
Create a New Project called YourLastnameLowestScore.

Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions:

· void getScore() should ask the user for a test score, store it in a reference parameter variable, and validate it. This function should be called from main once for each of the five scores to be entered.
· void calcAverage() should calculate and display the average of the four highest scores. This function should be called just once by main, and should be passed the five scores.
· int findLowest() should find and return the lowest of the five scores passed to it. It should be called by calcAverage, which uses the function to determine which of the five scores to drop.

Input Validation: Do not accept test scores lower than 0 or higher than 100.

3. Overloaded Hospital
Create a New Project called YourLastnameHospital.

Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient, the following data should be entered:
· The number of days spent in the hospital
· The daily rate
· Hospital medication charges
· Charges for hospital services (lab tests, etc.)
The program should ask for the following data if the patient was an out-patient:
· Charges for hospital services (lab tests, etc.)
· Hospital medication charges
The program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out-patient information. Both functions should return the total charges.

Input Validation: Do not accept negative numbers for any data.

Again I would appreciate if someone could start me on the right path to completing these programs
AnswerRe: Help With A Program. I Dont Know Where To Begin. PLZ HELP ME Pin
CPallini8-Oct-08 9:32
mveCPallini8-Oct-08 9:32 
GeneralRe: Help With A Program. I Dont Know Where To Begin. PLZ HELP ME Pin
Perspx8-Oct-08 9:44
Perspx8-Oct-08 9:44 
AnswerRe: Help With A Program. I Dont Know Where To Begin. PLZ HELP ME Pin
David Crow8-Oct-08 10:01
David Crow8-Oct-08 10:01 
QuestionUnable to set QueryTimeout on CDatabase* Pin
spongetodd8-Oct-08 5:19
spongetodd8-Oct-08 5:19 
AnswerRe: Unable to set QueryTimeout on CDatabase* Pin
Mark Salsbery8-Oct-08 6:53
Mark Salsbery8-Oct-08 6:53 
GeneralRe: Unable to set QueryTimeout on CDatabase* Pin
spongetodd8-Oct-08 7:05
spongetodd8-Oct-08 7:05 
GeneralRe: Unable to set QueryTimeout on CDatabase* Pin
led mike8-Oct-08 10:15
led mike8-Oct-08 10:15 
GeneralRe: Unable to set QueryTimeout on CDatabase* Pin
Mark Salsbery8-Oct-08 10:28
Mark Salsbery8-Oct-08 10:28 
GeneralRe: Unable to set QueryTimeout on CDatabase* Pin
Mark Salsbery8-Oct-08 10:29
Mark Salsbery8-Oct-08 10:29 
GeneralRe: Unable to set QueryTimeout on CDatabase* Pin
led mike8-Oct-08 10:37
led mike8-Oct-08 10:37 
QuestionC++: Connectin string to MS SQL 2005? Pin
Gofur Halmurat8-Oct-08 3:57
Gofur Halmurat8-Oct-08 3:57 
AnswerRe: C++: Connectin string to MS SQL 2005? Pin
led mike8-Oct-08 4:36
led mike8-Oct-08 4:36 
AnswerRe: C++: Connectin string to MS SQL 2005? Pin
Mark Salsbery8-Oct-08 4:56
Mark Salsbery8-Oct-08 4:56 
QuestionDisabling the root node in a tree control in MFC Pin
SanjaySMK8-Oct-08 3:26
SanjaySMK8-Oct-08 3:26 
QuestionRe: Disabling the root node in a tree control in MFC Pin
led mike8-Oct-08 4:32
led mike8-Oct-08 4:32 
AnswerRe: Disabling the root node in a tree control in MFC Pin
Maximilien8-Oct-08 8:15
Maximilien8-Oct-08 8:15 
QuestionHiding Application from taskbar.. Pin
gothic_coder8-Oct-08 2:55
gothic_coder8-Oct-08 2:55 

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.