No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Question is: Create a class Employee with following constraints in mind: 1. Declare three private data members named id,name,NIC of int,string,long respectively. 2. Overload stream insertion and stream extraction operators. Implement a global function named saveData, that'll allow the user to enter any number of employee's data and store it … |
|
Write a program that displays the same string in four different colors,using a loop. Call the SetTextColor procedure.Any color may be chosen, but you may find it easiest to change the forground color. Include irvine32.inc .data Str BYTE “This is the string”, 0 Color BYTE red,yellow,blue,cyan .code Main PROC Mov … |
|
I know coding in c++ pretty much ..but I want to learn graphics .. I am using DEV-C++ 5.11 .. Can anyone tell me online link to graphics site? |
|
I'm working on exception handling. Here is my code, I need some help.. Requirements: => If the user push a value to stack when stack is full,it must throw an exception of type "cInvalidPush". => If the user pop a value from stack when stack is empty , it must … |
|
Re:
Write a C++ program to help a cashier person when returning change to the customer. Your program should read two real numbers: the amount of required money and the amount of paid money. The program outputs the change that should be returned to the customer. Your program should display appropriate … |
|
Ok guys ! I'm trying to study operator overloading. which i found the toughest article in OOP :( I tried a code for == operator overloading to check whether both arrays have same elements or not but it isn't working. Can anyone help? Here is my code: #include<iostream> using namespace … |
|
I have a little confusion in my mind. I know very well the difference between preincrement and postincrement, postdecrement and predecrement. But i wonder how do these operators work during loop. I ,myself, use postincrement or decrement in loop as follows: for(int i=0;i<5;i++) { //code } But in my book … |
|
Re:
With regard to C++ books, I'll just echo the advice here .The following books are recommended; read them in mostly the order listed." Accelerated C++ " Andrew Koenig & Barbara Moo " The C++ Standard Library " Nicolai Josuttis --- a "must have" " Effective C++ ", " More Effective … |
|
I need to find out the output of the following code snippet return by function go(2) ... int a=10; int go(int b) { if(b<=4) return b; else return go(b+1)*go(b-2)-(b*2); ++a; cout<<a; return -1; } When I do the dryrun myself on paper , it should first return the value of … |
|
Re:
Hi! I have an assignment. A C++ program. But sad to say I dont know how. -Write a program that multiplies two numbers withou using (*symbol). (Use for loops) Please help me! |
|
hey guys Im here again :P Here is my code for bank account class.. #include<iostream> #include<iomanip> using namespace std; class account { private: int account_balance; public: account(int acc) //constructor { if(acc>=0) { account_balance=acc; } else { account_balance=0; cout<<"initial balance is invalid"<<endl; } } int credit(int ammount) //credit member function { … |
|
can anyone please tell me what's wrong with my code? I have made this code but the compiler is giving the error that all member functions are non-class type. I can't fix this. Here is my code: #include<iostream> #include<string> using namespace std; /*class Invoice which demonstrates capabilties */ class invoice … |
|
Re:
Write a function in C++ which accepts an **2d array and its size** as arguments/parameters and exchanges the values of *first half side elements with the second half side elements of the array.* |