Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: To print two index in a sentence Pin
Richard MacCutchan31-Mar-21 21:16
mveRichard MacCutchan31-Mar-21 21:16 
GeneralRe: To print two index in a sentence Pin
Eugene Low31-Mar-21 22:04
Eugene Low31-Mar-21 22:04 
GeneralRe: To print two index in a sentence Pin
Richard MacCutchan31-Mar-21 23:49
mveRichard MacCutchan31-Mar-21 23:49 
AnswerRe: To print two index in a sentence Pin
CPallini1-Apr-21 0:09
mveCPallini1-Apr-21 0:09 
Questionhelp me Pin
Member 1512893231-Mar-21 4:09
Member 1512893231-Mar-21 4:09 
AnswerRe: help me Pin
Richard MacCutchan31-Mar-21 4:17
mveRichard MacCutchan31-Mar-21 4:17 
AnswerRe: help me Pin
CPallini31-Mar-21 19:54
mveCPallini31-Mar-21 19:54 
Questionc++ Pin
Brothers fun28-Mar-21 10:14
Brothers fun28-Mar-21 10:14 
in c++ : (Account Class) Create an Account class that a bank might use to represent customers' bank accounts. Include a data member of type int to represent the account balance. Provide a constructor that receives an initial balance and uses it to initialize the data members. The constructor should validate the initial balance to ensure that it's greater than or equal to 0. If not, set the balance to 0 and display an error message indicating that the initial balance was invalid. Provide three member functions. Member function credit should add an amount to the current balance. Member function debit should withdraw money from the Account and ensure that the debit amount does not exceed the Account's balance. If it does, the balance should be left unchanged and the function should print a message indicating "Debit amount exceeded account balance." Member function getBalance should return the current balance. Create a program that creates at least two Account objects and tests the member functions of class Account.

task 1:derived two classes from Account class

one is bank albilad data members visa, points o

ther is alrajhi bank data members mastercard, points
set and get functions and chargevisa and chargemastercards.

set not exceed account balance.

charge not exceed visa or mastercards balance.

set points visa 10%, mastercards 15%. get functions

Make appropriate member functions const.
task 2:disinherite the classes

classes should share set and get function.
AnswerRe: c++ Pin
Dave Kreskowiak28-Mar-21 10:40
mveDave Kreskowiak28-Mar-21 10:40 
Question<algorithm> sort keeps generating error messages. Pin
aschwarz25-Mar-21 22:12
aschwarz25-Mar-21 22:12 
AnswerRe: <algorithm> sort keeps generating error messages. Pin
Greg Utas26-Mar-21 1:21
professionalGreg Utas26-Mar-21 1:21 
GeneralRe: <algorithm> sort keeps generating error messages. Pin
aschwarz26-Mar-21 6:48
aschwarz26-Mar-21 6:48 
AnswerRe: <algorithm> sort keeps generating error messages. Pin
Mircea Neacsu26-Mar-21 2:40
Mircea Neacsu26-Mar-21 2:40 
GeneralRe: <algorithm> sort keeps generating error messages. Pin
aschwarz26-Mar-21 10:27
aschwarz26-Mar-21 10:27 
GeneralRe: <algorithm> sort keeps generating error messages. Pin
Mircea Neacsu26-Mar-21 12:22
Mircea Neacsu26-Mar-21 12:22 
QuestionWin32 Structures Pin
Richard Andrew x6414-Mar-21 9:52
professionalRichard Andrew x6414-Mar-21 9:52 
AnswerRe: Win32 Structures Pin
Mircea Neacsu14-Mar-21 10:22
Mircea Neacsu14-Mar-21 10:22 
GeneralRe: Win32 Structures Pin
Richard Andrew x6414-Mar-21 10:32
professionalRichard Andrew x6414-Mar-21 10:32 
GeneralRe: Win32 Structures Pin
Mircea Neacsu14-Mar-21 10:36
Mircea Neacsu14-Mar-21 10:36 
AnswerRe: Win32 Structures Pin
11917640 Member 17-Mar-21 3:01
11917640 Member 17-Mar-21 3:01 
GeneralRe: Win32 Structures Pin
Richard Andrew x6417-Mar-21 9:20
professionalRichard Andrew x6417-Mar-21 9:20 
GeneralRe: Win32 Structures Pin
11917640 Member 17-Mar-21 19:19
11917640 Member 17-Mar-21 19:19 
QuestionZoom image on mouse position Pin
Gopi Nath12-Mar-21 0:20
Gopi Nath12-Mar-21 0:20 
AnswerRe: Zoom image on mouse position Pin
Richard MacCutchan12-Mar-21 1:28
mveRichard MacCutchan12-Mar-21 1:28 
GeneralRe: Zoom image on mouse position Pin
Gopi Nath14-Mar-21 20:34
Gopi Nath14-Mar-21 20:34 

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.