49,760 Topics

Member Avatar for
Member Avatar for twtw

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; …

0
88
Member Avatar for twtw

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 …

Member Avatar for Maritimo
0
216
Member Avatar for adnan121

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 …

Member Avatar for gusano79
0
183
Member Avatar for nitin1

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.

Member Avatar for Duoas
0
4K
Member Avatar for mR.faVOriTo

` #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 …

Member Avatar for tinstaafl
0
2K
Member Avatar for nuller

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

Member Avatar for NathanOliver
0
84
Member Avatar for senergy

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 …

Member Avatar for triumphost
0
613
Member Avatar for juliocesar.schincariolfilho

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 …

Member Avatar for triumphost
0
2K
Member Avatar for omnizw.ani
Member Avatar for rubberman
0
75
Member Avatar for bc230201818

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 = …

Member Avatar for bc230201818
0
597
Member Avatar for bc230201818

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 …

Member Avatar for bc230201818
0
199
Member Avatar for nuller

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?

Member Avatar for Duoas
0
493
Member Avatar for EddieC

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 …

Member Avatar for mike_2000_17
1
1K
Member Avatar for yaya1234

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 …

Member Avatar for Suzie999
0
161
Member Avatar for Maryam_6
Member Avatar for mikeandike22

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 …

Member Avatar for The Old Man
1
462
Member Avatar for abrar7866

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 …

Member Avatar for Maritimo
0
332
Member Avatar for bc230201818

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 …

0
102
Member Avatar for Maryam_6
Member Avatar for bc230201818

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) …

Member Avatar for bc230201818
0
182
Member Avatar for ASHKAN_2

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]; …

Member Avatar for Frederick2
0
335
Member Avatar for nuller

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. …

Member Avatar for tinstaafl
0
272
Member Avatar for maria.gretta

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 …

Member Avatar for bc230201818
0
207
Member Avatar for nitin1

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? …

Member Avatar for Itecg
0
271
Member Avatar for kks21199

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); …

Member Avatar for kks21199
0
2K
Member Avatar for Erma_2

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 …

Member Avatar for gusano79
0
188
Member Avatar for kungle

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 …

Member Avatar for Maritimo
0
593
Member Avatar for harinath_2007

I would like to play a video using c/c++ program.. what libraries should i include?? can anyone tell the code....

Member Avatar for 良红
0
9K
Member Avatar for exoruel

Good day everyone! I have the codes for such a problem where, to create a program that counts how many times the second string appears on the first string. Here it is: #include <iostream> #include <conio.h> using namespace std; int main () { char first [100], second; int count; cout …

Member Avatar for exoruel
0
367
Member Avatar for bchinfosieeuw

How can I make a textile in a FLTK executable in main(), so when opening the program, and put text in it? The standard way via ofstream does not work now. The code I want to elaborate on is on this website: http://www.fltk.org/strfiles/267/fltk_input.cpp Now when I add ofstream myfile; myfile.open …

Member Avatar for bchinfosieeuw
0
171

The End.