49,761 Topics
| |
hello im doing this assgment.need a solution urgently! Animal Show is organized. There are 2 sessions for the show, which are 2pm-4pm and 8pm-10pm per day. There are only 50 tickets available per session per day. For the show, a ticket for an adult sells for RM10 while for a … | |
I wrote a command pattern to my class Administrator, HR and Staff. Each of it has several MF but command only operate on single MF. Therefore, i got this design. I got the solution like this. CommandList composes Vector of command. [CODE] class GenericCommander; class ComamndList : public GenericCommander {}; … | |
m facing problem while running...computer graphic program on turbo c++ its giving me errors like "ntvdm has perfomed an illegal operation" or "16 bit ms dos subsystem error" | |
Hi, I am trying to wrap a simple C++ class called math and export it to VB.NET using a DLL made in VC++ 2008. The implementation for the wrapper functions is as follows: [code=CPP] void * _stdcall CreateMath() { return new math; } void _stdcall DestroyMath( void *Math ) { … | |
I have a program that will populate a 2d array with random numbers and sort it. But I need it to exclude elements with a zero subscript, and I can't get that to work. Please help. { double arr[rows][cols]; int i, j, temp; int *arr_ptr; arr_ptr=(int*)arr; srand(time(NULL)); for(i = 0; … | |
error C2011: 'Item' : 'class' type redefinition well... i don't know how to explained this...this error just come out of nowhere, or i can''t find it...and i not really know what it's mean... this Item class are base class for 3 sub class, and it was no problem before i … | |
Well basicly the problem is that i have to call the function push while the char that is asked for is not '0' then i have to send the modified "*top" and "*temp" into the function POP so that i can show the values and do the deleting of the … | |
Hi, Could anyone explain to me why this works: [code = c++] #include "stdafx.h" #include <iostream> using namespace std; class A { public: A() { a = 0; } int a; }; void change(A* source, A* destination) { destination = source; } int _tmain(int argc, _TCHAR* argv[]) { A* ob1 … | |
Hi All, I have created a class [B]person[/B] and derived [B]patient[/B] and [B]doctor[/B] classes from [B]person[/B]. Also I derived [B]student_patient[/B] and [B]emp_patient[/B] classes from [B]patient [/B]class. I want to make a small calculation at [B]patient[/B], [B]student_patient[/B] and [B]emp_patient[/B] classes by using a function from [B]doctor [/B]class wihch is [B]get_fee_of_doc[/B]. I … | |
Hi Guys I am new at this, and I despeartely require some help. I basically need to write a program to read a text file, alter a single value and write it to a new file. I have done some stuff so far which seems to be correct, however, nothing … | |
please can anyone explain the reason for the following behavior #include <iostream> #include <boost/enable_shared_from_this.hpp> using namespace std; class A; typedef boost::shared_ptr<A> A_sptr_t; class B; typedef boost::shared_ptr<B> B_sptr_t; class A : public boost::enable_shared_from_this<A> { public: A() {} virtual ~A() {} }; class B : public A, public boost::enable_shared_from_this<B> { public: B() … | |
hi everybody, I am blocked on a strange error. I need to use md5sum library. Visual c++ can read md5sum.h but it throws some errors when tries to compile it, it seems that visual c doesn't identify md5sum.cpp where constructors and functions are declared. I have already changed include library … | |
I am doing a program to print out the shortest path between locations. I implemented it using a 2D array for the adjacency matrix. However, when I run it and input the start and end locations, nothing else happens. [CODE]#include <iostream> #include <limits.h> #include <assert.h> #include <cstdlib> using namespace std; … | |
I have a question we are suppose to input a seed value for a randon number generator, but I am having issues with using the srand(seed), but the problem is I am getting the same output every time for the random numbers how can I do it with the user … | |
Hi, I want to Load .dll library on my program. I was using LoadLibrary and GetProcAddress which is tedious work. I saw somewhere Idea of using .lib files but have no clue. I have used google but I got lost. Please help me :( Codeblocks 8.02 MINGW 3.4.5 Windows Vista | |
Hello all, I have a [B]base class[/B] which is called [B]person[/B]. I derived a class from[B] person[/B] which is called [B]patient[/B]. My question is can I derive two more classes ([B]patient_student and patient employee[/B]) from [B]derived class patient[/B] or should I derive them from [B]person[/B]? If I can derive classes … | |
Hello everyone, I am dealing with this problem that I receive a buffer from a client, and when I try to output what the client sends to my program, it only shows everything till the first zero character. [code=C++] #include <cstdio> #include <winsock2.h> #include <iostream> #include <string> using namespace std; … | |
Can someone please conver the following code into a sequence diagram for me? the 4 instances and classes with the life lines are: `theUI:UserInterface`, `theCashPoint:CashPoint`, `theActiveAccount:BankAccount` and `transactions:TransactionList` void CashPoint::m4_produceStatementForBankAccount() const { string statement( p_theActiveAccount_->prepareFormattedStatement()); theUI_.showStatementOnScreen( statement); } string BankAccount::prepareFormattedStatement() const { ostringstream os; //account details os << prepareFormattedAccountDetails(); //list … | |
Please can you help me with the following question? An iterative version of the C++ function TransactionList::getTransactionsForDate is given below. It can be applied to any list of transactions and returns the list of all the transactions for the given date. It only works when the date given is valid. … | |
well here's my story...... im 16 ..... and i do wish very much to learn how to work with computers..... but the thing is i don't know from where to start......... i know nothing about programming ...... and i want to use my intellectual capacities to solve problems and mostly … | |
realy i did not understand that what function over riding means can any body help me for that please | |
Hello everyone. I am pretty lost when it comes to C++, but for class i have to create this mortgage calculator. I think i have this part of the assignment done, but i can not figure out how to convert either the last number, or the user input to a … | |
and how i would go about fixing it? main [code] #include <iostream> #include "Format.h" #include <fstream> using namespace std; int main() { Format format; //string word; char in; ifstream infile; bool a=true; bool b=true; bool c=true; while(b==true) { cout<<"to quit type 'q'\n" <<"enter 'c' to get from console\n" <<"enter 'f' … | |
Hi, Just wonder is there any way to display enum as enum not as integer? Thank you. | |
Hey, I'm having some troubles with my hangman game i'm making. I want it to display dashes for the number of characters that there are in the word which that part works fine. but then if they guess the right letter, I want the dash to be replaced with the … | |
Hi I need some help in writing a c++ program that will read a file and delete a specified number of lines e.g. say i have data file with numbers 1 to 100 i.e. 1 2 3.... 100 say i want to delete top ten lines and then save the … | |
Hi, I am looking for a C++ library for 3D data visualisation. The main features that I'm looking for are 1. Capability to handle large data sets(MB's to few GBs) 2. Interactive 3D visualisation 3. Slicing through the data cube 4. Real time visualisation from buffer without having to save … | |
hi all, i am not-so-new to C++, but then ,yea, a newbie XD ok, here is the question. first i have a base class call Item, and it have 3 sub class. Now i need to make an array total of 100 item, that can store any of that 3 … | |
Hello I have 2 functions that are just playing up. One is a function that takes in a string & should output the string backwards. [B]Problem:[/B] the syntax to insert a character into the string is wrong, I dont know the correct syntax. The other is a function that takes … | |
Hi Can anyone tell me please How i can make program in C++. Thanks. |
The End.