49,761 Topics
| |
hi below is a switch case that is suppose to go to the next "hep" # and show a message... so if hep is 0 it shows one message, if hep is 1 it shows another, etc. I have it showing a message for 0, and 1, but it ALSO … | |
Write a class that implements a vector of integers with the following template: Class IntVector{ private: // all member variables public: IntVector( int n); // create a vector with size n ~IntVector(); // releases any memory allocated by the vector Int getElement(int i); //returns the element i in the vector; … | |
i cannot delete the lastest data i input, why. it show ".exe has stoppped working" void system1::deletenode(const string& id,const string& name) { string data; // User enters node to be deleted. nodetype * current = head; // Start at the head, and checks each node. nodetype * garbage = current; … | |
and i get error with error C2451: conditional expression of type 'std::basic_string<_Elem,_Traits,_Ax>' is illegal void system1::search() { cout<<"Enter ID to be Searched: "; int data_search; cin>>data_search; nodetype *current = head; while(current != NULL) { if(current->ID == data_search) { cout<<"\n----Linked List Linear Search Result----\n"; cout<<"ID: "<< current->ID <<endl; cout<<"Name: "<< current->NAME … | |
Data structures to be used The program should use two distinct structure-types to store the students’ scores: the 1st type used for keeping scores of 4 quizzes while the 2nd type is used to keep the scores of 2 exams. A student can have either quizzes (if Engineering student) or … | |
I am very confused with static functions. Can I override them? If no, then why? I searched web a lot but i am still not clear. Please tell with one example if possible. Thanks a lot. | |
` #include<iostream.h> #include<conio.h> #include<string.h> typedef char string50[51]; typedef char string08[9]; typedef struct { string50 strName; string08 strID; float fQuiz[3]; float fMacProb[2]; float fFinalExam; float fRawScore; float fFinalGrade; float fAveQ, fAveMP; }STUDENT_RECORD; typedef STUDENT_RECORD CLASS_RECORD[5]; #define Name 1 #define ID 2 #define QUIZ1 3 #define QUIZ2 4 #define QUIZ3 5 #define … | |
and my code to write into a file is ofstream file; file.open("CustomerFile.txt",ios::app); file.write((char *) & customer,sizeof Customer); file.close(); file.open("AccountFile.txt",ios::app); file.write((char *)& account,sizeof Account); file.close(); can someone figure out my mistakes. Thanks in advance | |
so I have this code to draw screen to client area every 100ms HDC hDC = GetDC(hWnd); SetStretchBltMode(hDC, HALFTONE); StretchBlt(hDC, 0, 0, screen.right/2, screen.bottom/2, GetDC(NULL), 0, 0, screen.right, screen.bottom, SRCCOPY); DeleteDC(hDC); however whenever it draws the program freezes for a while (like 10ms), it's not really noticeable unless you move … | |
I'm trying to load a png to my button, but it's not showing the png in my button. I create my button with this function: HWND MyControls::CreateButton(LPCTSTR text, int x, int y, int w, int h, HMENU id, HWND hwnd, HINSTANCE hInst, bool png){ if (png){ return CreateWindow("BUTTON", text, BS_BITMAP … | |
[Click Here](http://moodle.squ.edu.om/file.php/5759/hw_4_Fall2014.pdf) | |
brushing Up the practise of class and its implimentation #include<iostream> #include<stdlib.h> #include<conio.h> #include<string> #include<Windows.h> using namespace std; class Student{ private: int ID; string IDch; string name; public: Student(){ int ID = 0; string name; string IDch; } int getID(){ return ID; } void setID(int ID){ this->ID = ID; ID = … | |
A simple function #include<iostream> #include<string> #include<conio.h> #include<stdlib.h> using namespace std; class name{ //******************************* private: string fName; string mName; string lName; int ppl; //******************************* public: int getPpl(){return ppl;} void setPpl(int ppl){this->ppl=ppl;} name(){fName;mName;lName;ppl=0;} string getfName(){ return fName;} string getmName(){ return mName;} string getlName(){ return lName;} void setfName (string Aname){this->fName=Aname;cout<<" X. Please Enter … | |
fstream file; file.open("PasswordGenFile.dat",ios::out); In writing into a .dat file what does the following line mean? file.write((char *) this, sizeof(PasswordGenerator)); And how can i convert this bit of code if i want to write it into a .txt file? | |
Microsoft this week acquired [url=http://www.teamprise.com/]Teamprise[/url], a division of [url=http://www.sourcegear.com/]SourceGear[/url] that built tools to give developers access to Visual Studio 2008 Team Foundation Server from systems running Linux, Mac OS X and Unix.SourceGear's flagship [url=http://www.sourcegear.com/sos/]SourceOffSite[/url] provides remote access to Visual SouceSafe, Microsoft's version control system. Teamprise comes in [url=http://www.teamprise.com/products/download/]three forms[/url]. The … | |
Hey, I used getline to read from file. When i have the char '#' I should ignore that line.. I want to put in the privat values of the class what I got from the file.. Here is what I did.. it works only for one line and then when … | |
| |
If you are a programmer than you probably know or at least know of C++ well now a company called Digital Mars is developing the D programming lanugage. [I] "D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with … | |
int firstarray[12][7] = { }; double firstClass(int airplane, int seats, double price) {cout<<setw(60)<<"---------------------... cout<<setw(60)<<"You are in **first class** booking screen\n"; cout<<setw(60)<<"----------------------... cout<<"\n"; cout<<"How many seats would you like to book for first class?"<<" ";cin>>seats; for(int row=0; row<2; row++) { for(int column=0;column<7;column++) { } } } The thing is, The first … | |
The set of codes have been taken from Paul programming Tutorials of Bianary search tree while listening to the tutorial and is not my effort . neither I have written this program. How ever converting the set of codes into animation has been done by me Enjoy watching and it … | |
| |
PLease write a better code which is rather advance form using #include<queue> && #include<list> #include<iostream> #include<conio.h> #include <iomanip.h> using namespace std; const int size=20; // Patient Class class Patient { int age; char name[30],phy; public: Patient() { age=0; strcpy(name,""); phy=NULL; } void SetName(char* P_name) { strcpy(name,P_name); } void SetAge(int P_age) … | |
Hi i have this program that is about library management system in C++ language and i want to convert it to C but i dont know what to do. if someone could help me i would be thankful. #include<stdio.h> #include<conio.h> #include<iostream.h> #include<stdlib.h> #include<string.h> #define MAX 100 struct book{ char bookname[80]; … | |
i need to make a c++ console based program for a banking system using files. i implemented some code but having difficulty with withdrawing money from the account, checking balance, transferring funds and viewing transaction. For withdrawing funds i implemented the following code but it doesn't seem to work properly. … | |
create a c++ program that has 3 functions with return type void first function is called Sum the second function is called Information and the third is called Calculation. a) in the definition of Sum function, you should creat 5 random numbers and print their sum value. b) in the … | |
I am using namespaces from a long time now. But, I don't know why we need them at the end? Why do I need to write using namespace std; OR std::string Why do we have to do this? Why have they made it this way? Can you elabroate this thing? … | |
Hello, I am using turbo c++ 4.0. I know its outdated but i have to use turbo c++ for this project. Here is my current code, #include<iostream.h> #include <stdlib.h> #include <fstream.h> class item { private: char name[]; int code[]; float price[]; int z; fstream datfile; public: void add(void); void delete_(void); … | |
How to solve this problem? I'm getting tired thinking abou this. Help me. Write a C++ program to help the master reporter of a traffic centre to analyse the amount of traffic coming from all the different entry points to a city. The amount of traffic for each entry point … | |
If I (have to) use C/C++, I'm mostly working on time-critical or real-time applications. Examples are OpenGL texture Streaming (Example: Streaming Satalite Data on planet surface in realtime: https://www.youtube.com/watch?v=ws2ra5MvDi4) or real-time PSM audio maonpulation (Example: Automatic tuning a guitar to a C64= SID tremolo: http://www.yousry.de/audio-example-real-time-tune-detection-tuning-auto-tuning/). During development I'm using "**-O0 … | |
I would like to play a video using c/c++ program.. what libraries should i include?? can anyone tell the code.... |
The End.