49,766 Topics
![]() | |
#include<iostream.h> #include <stdlib.h> //FOR exit(1) struct Flight { char flightNo[5]; char date[12]; char time[6]; char gate[3]; }; Flight flight={"AB11","10-12-2008","20:30","RT"}; struct Seat { char name[40]; char booking_ID[3]; int seats; }; Seat choice[4][5]; void displaymenu(); void booking(); void seat(); void ticket(); void records(); void menu(); void exit(); //Variables int selection,i,j,password; int seats_num[20]={0}; … | |
Hello, Please help me to overcome the following confussion. Suppose I have created an array of pointers like, A** l_aAPtr = new A*[l_iTotal]; for(int i = 0; i<l_iTotal;i++) { l_aAPtr[i] = new A(); } Now I want to delete this array. Please advise which of the following way is correct … | |
I dont no how to fix. Can someone help me out plz. (Please see the picture) [IMG]http://i61.tinypic.com/2r2cfnq.png[/IMG] #ifndef DYNINTSTACK_H #define DYNINTSTACK_H class DynIntStack { private: // Structure for stack nodes struct StackNode { int value; // Value in the node StackNode *next; // Pointer to the next node }; StackNode … | |
ok i am very sorry if this comes off as irritating to some, but i need someone to reassure or direct me. i have learned some programming, very very basic to be exact and i have learned some c# and some C++. the problem is, I like c# because it … | |
IplImage *in; CvMemStorage *storage = cvCreateMemStorage (20506); CvSeq *contours=NULL; CvPoint *PointArray=NULL; for() { //image processing and feature extraction code here cvClearMemStorage (storage); //clear memory area free (PointArray); cvReleaseImage (&in); } At the end of each iteration i ma releasing memory but still i get memory shortage error after # processing … | |
Hello All Tell me who is correct I or my friend void main() { int GuessMe[4]={100, 50, 200, 20}; int Taker=random(2)+2; for(int Chance=0;Chance<Taker;Chance++) cout<<GuessMe[Chance]<<"#"; } I am testing random() in Turbo C++ 3.5 By this code I am always getting answer 100#50# whenever I am executing this code. My argument … | |
Does anyone know of a compiler that translates a C++ code to MIPS Assembly Language | |
Just like the title says, could you give me arguments for it? | |
I am to make a rev op on linked node but somehow i couldnt get to work. I got an error I am kinda stuck right now. The error is in gray Somehow and somewhere doesnt show the reverse link. Can someone show how to do the search node like? … | |
i have a problem and i can not solve it. Problem is that for example there is an admission form on internet and a student enter his name in digits no dought it is wrong and now here is a problem how to restrict the student that he/she should not … | |
It is possible to use any number of characters '/' as a delimiter in path instead of one traditional '/'. For example, strings //usr///local//nginx/sbin// and /usr/local/nginx///sbi n are equivalent. The character '/' (or some sequence of such characters) at the end of the path is required only in case of … | |
Ok, I hope this is the right place for his kind of disccusion. I assume that this kind of question is rather apsurd but I may get killed for this. I have had expirience with both java and c++ but non in field of system programming. I am finishing my … | |
here is the question: The series of numbers: 1, 1, 2, 3, 5, 8, 13, 21, ….is known as Fibonacci series. Each number is the sum of the two preceding numbers. Write a C++ program that writes the first 5 Fibonacci numbers to a file fibnos.txt (in your local drive). … | |
I'm trying to understand this function. I try to compile an run it, but it gives an error message at line 12. Thanks. #include <iostream> #include <string> #include <cmath> using namespace std; int stringConvertInt(string raw) { int sum=0, power=0; power=raw.length()-1; for(int i=0; i<raw.length(); i++) { sum=sum+(pow(10,power)*(raw[i]-48)); power--; } return sum; … | |
i have a problem that how to concatenate more than two string in operator overloading i write a code but it is not run #include<iostream> #include<conio.h> using namespace std; class count { private: char str[50]; public: count() { str[0]='r'; } void input() { cout<<"Enter string = "; cin.getline(str,50); } count … | |
My program displays the details of 2 students. name id address module code and module marks. my program works well but the problem is when i enter the details of the 2nd student i am not able to enter the name as if it skip this first part and go … | |
Here's a little program i wrote, i'm trying to pass my structure book to function input. The code works fine on Code::Blocks but VS12 is giving an error on compliation " error C4700: uninitialized local variable 's' used ". What i'm doing wrong? #include <string.h> #include <iostream> using namespace std; … | |
The insert function int the arrayList is not working...d[count] = v is giving garbage.I am unable to find the problem.Can anybody please help. class ArrayList { private: int count; int *d; public: ArrayList(int size=2) { d=new int[size]; count = 0; } void insert (int r) { d[count] = r; count++; … ![]() | |
This fuction of insert in descending order is not working.Can't find the problem.Can anyone help? class LinkedList { private: class ListNode { public: int data; ListNode *next; ListNode(int d) { data=d; next = NULL; } }; ListNode *head; public: LinkedList() { head=NULL; } void Inorder(int d) { ListNode *tmp = … | |
#include <iostream> #include <conio.h> using namespace std; int main(){ char command[1024]; char newchar; cout << "Command Line Interface Test with Intellisense" << endl; cout << endl; newchar = _getch(); command = command + newchar; } My Code. It doesn't work. `command = command + newchar` has a problem. Please help. | |
please give me a code of multiple linked queue in data structure using c++ | |
I have a text file below that I read from. 0123456789012345678 IN NUMBER LOOP LD NUMBER BZ LPEND LD TOTAL ADD ONE STO TOTAL LD ZERO SUB NUMBER BGTR ENDIF BZ ENDIF LD POSITS ADD ONE STO POSITS ENDIF IN NUMBER B LOOP LPEND LD POSITS MPY HNDRD DIV TOTAL … | |
i am not able to connect to the sql server on my system. SqlConnection^ connection=gcnew SqlConnection(); connection->ConnectionString ="Data Source=blueboy\sqlexpress;Initial Catalog=DCV_DB;Integrated Security=SSPI;Pooling=False"; i got the string from database properties.(i have attached the same in this post) sql service is running. tcp ports are enables too. | |
Please help me with this error. Thank you in advance [Linker error] undefined reference to `Simple_window::Simple_window(Point, int, int, String const&)' | |
Write a complete C++ program that reads the attached file (values.txt) to find and print the following: a. The average value of the numbers in the file. b. The maximum and minimum value c. The count of negative and positive values (ignore zero) #include <iostream> #include<fstream> using namespace std; int … | |
I tried all possible test cases and It outputed the correct answer , I wonder why UVA doesn't accept my answer <#include<iostream> #include <stdio.h> using namespace std; int main() { int i, j; unsigned long long int tempI, tempJ; int maxCaseLen = 1; int count = 1; while (scanf("%d %d", … | |
I am getting an error in the header file: class linkedStackType: public stackADT<Type> Can you see anything wrong with what I have, and why the compiler is complaining about "stackADT"? I would love it if you could give me some insight into this matter. Right now I'm only concerned about … | |
// This program uses the a queue template to create a queue of strings. #include <iomanip> #include <iostream> #include <cstdlib> using namespace std; // // TO CREATE A "template" class named "T" template <class T> // // TO CREATE A CLASS NAMED "Dynque" class Dynque { private: struct QueueNode { … |
The End.