49,757 Topics

Member Avatar for
Member Avatar for scoob

I have this assignemt to make a double link list for a student database. I have tried to make it in single link list so that i can understand the implementation. the problem is that i can't make it a double link list :S i am so confused! plz someone …

Member Avatar for scoob
0
262
Member Avatar for smeghead007

ok guys need some help, I'm sure the answer is simple but i'm making a program for an assignement that models points in a cartesian plane and prints them out this is what i have so far in main [CODE]#include "point.h" #include <iostream> #include <string> #include <fstream> //for ifstream,ofstream #include …

Member Avatar for smeghead007
0
103
Member Avatar for rsantoosa

I am trying to write a program that does operations with rational numbers. My program runs and is able to add, subtract, multiply and divide. However, it does nto reduce the fraction and when printing in decimal form, it returns an int rather than a double. For example, it would …

Member Avatar for geojia
0
189
Member Avatar for CPT

As the title suggests I need to write the class of a graph object. It is required that I write a function that prints the graph determine if the graph has conex components,what are the cinex components, if the graph has cycles, and to determine the shortest and longest road …

Member Avatar for Tellalca
0
132
Member Avatar for Tellalca

Hey; I'm practicing with template classes. When I declare a user-typed destructor for this template class, the program freezes and needs to be closed explicitly. Obviously, in the destructor, I am trying to release the memory allocated to hold the coordinates[3] array. What is the problem with declaring a user-typed …

Member Avatar for Tellalca
0
1K
Member Avatar for natha_peepli

[CODE] #include <iostream> using namespace std; class vector1 { float vector[]; int y; public : vector1(int x) { y=x; cout<<"enter the elements of the array"; for(int i=0; i<=y; i++) { cin>>vector[y]; } cout<<"elements of vectors are"; cout<<"{"; for(int i=0; i<y; i++) { cout<<"\n"<<vector[i]; } cout<<"}"; } void modify(int z) { …

Member Avatar for natha_peepli
0
168
Member Avatar for vavazoom

I'm trying to create a random float generator. The float must be 2 decimal places and between the values 0.50 and 999.99. I tried casting rand() to a float below, which didn't work. I'd still like to know the reason this didn't work. [CODE] saleAmount = ((float)rand() % 99950.00 + …

Member Avatar for vavazoom
0
271
Member Avatar for samsons17

I am in my way of studying the linked list chapter of C++.. So i go through this code below intended of understand it. [CODE] #include <iostream> using namespace std; struct nodeType { int info; nodeType *link; }; void printList (nodeType *first) { nodeType *current; current=first; while (current != NULL) …

Member Avatar for fmadsen
0
114
Member Avatar for araib

hey guys...!! i really want ur help in this program..!! its a Hospital management system program..!! it take input from the use..it can save input in a file..display all input on to screen, but i cant find a way to delete a record/patient details from the file PLZ help me..!! …

Member Avatar for araib
0
360
Member Avatar for epicasian

Well, I've been Googling for at least 30 minutes, and looking through past posts about this, but just can't seem to find an answer that works. Basically, I've got a component class that has a single method I'm trying to test out. The entity class has a private array of …

Member Avatar for epicasian
0
216
Member Avatar for jemes bond

Hi, I am a computer Science Student having knowledge of basics in C++. I have to make a C++ project (Online airline reservation project). Please guide me how to make such an online project in C++. What all tools i need to use and how much time they will take. …

Member Avatar for geojia
0
369
Member Avatar for Andrew Davis 64

I have no idea how C++ works, but I'd like to learn... Is it possible to create java files/programs using C++?

Member Avatar for geojia
0
206
Member Avatar for .:Pudge:.

What is the greatest possible range of rand()? I want to make it that of a long signed integer, but my program crashes. Is there another way to get that range?

Member Avatar for Tellalca
0
102
Member Avatar for noname1810

Hello, everybody! I'm writing a code, which should be able to insert a node to a binary tree where specified. Commands are being loaded from a .txt file. The contents of the .txt file are the following: 1 L 1 2 R 1 3 L 2 6 R 2 4 …

Member Avatar for Tellalca
0
156
Member Avatar for tKc

I am trying to write a program that dynamically increase the size of an array. essentially creating an array inside of an array with array [b]a[/b] storing 100 int pointers. my code is initially having problems on line [code] a[count] = new int [n]; [/code] any tips or pointers as …

Member Avatar for Tellalca
0
152
Member Avatar for tegaelam

Hi! I saw a post on this site that exhibited the same exact problem that I have for a homework assignment and while it was solved, my issue with the homework assignment is different. The C++ program that I wrote asked the user to input information but once you enter …

Member Avatar for tegaelam
0
624
Member Avatar for bkempert

Hello everyone, I've used this website many times to help myself based off of others' questions, but now I have a problem of my own that I can not solve. I was assigned the task of creating a stack program in C++ using a linked list. Seems simple enough, but …

Member Avatar for bkempert
0
132
Member Avatar for gizmo7008

I'm making a student database using array based lists. I'm having trouble with making the list size created by the user. I have a for loop there now but once I put it there, I get an error saying aStudent is an undeclared variable and I don't understand why. There …

Member Avatar for gizmo7008
0
440
Member Avatar for Eshagul

Hi! guys i am a beginner and jus wanna know Using if else or switch operators i need to know the c++ code for writing a program that accepts a character and determines whether the character is lowercase letter

Member Avatar for geojia
0
53
Member Avatar for amoony

Hi every body I have about while loops and I just answered Q: a & b plz help me [QUOTE] **Write a program that user while loops to perform the following steps: a)Prompt the user to input two integers: firstNum and secondNum. (firstNum must be less than secondNum.) . b)Output …

Member Avatar for amoony
0
865
Member Avatar for KellieD

I'm trying to write a progam that; Contains a function called sumN() which takes an int n as an argument and returns an int which is the sum of all integers between 1 and n. In the main() asks the user: How many values (s)he wants to enter (maximum 50); …

Member Avatar for SgtMe
0
152
Member Avatar for .:Pudge:.

I am having trouble printing the contents of a b-tree of order 'n' in level order. I have looked at algorithms online, but they only cover trees that have nodes with only 2 children. Shouldn't it also be called recursively? No algorithm I found used recursion. [CODE]void addToQue(struct node *root) …

0
51
Member Avatar for javac++

i neeeeeeeeeeeeeed help please Create code that: * stores the x and y coordinates of the mouse into two arrays x[] and y[]; * the size of x and y should be 50; * the latest coordinates (from mouseX and mouseY) should be stored in position number 0 of the …

Member Avatar for jonsca
-1
71
Member Avatar for purohiti

So i have to create a program which reads the number of days in the month and the temperatures. This info is in other file, temp.dat. I have how to calculate the average temperatures, but am having trouble reading from the file. Also, for every day that is in a …

Member Avatar for jonsca
0
86
Member Avatar for Tecnicrow

I'm having problems trying to implement a counting sort for a template linked list. I already coded everything and I get the correct output. Now I just need to sort using counting sort method. When I run the project, the program crashes and it says: First-chance exception at 0x00262805 in …

0
70
Member Avatar for indrajeet6

Hi all I've just downloaded the Visual C++ express 2010 from the microsoft website. but when i try to compile and run the program, it says: "Unable to start program 'C:\Documents and settings\Indrajeet Roy\My documents\Visual Studio 2010\Projects\First Prog.c\First prog.c.exe'. The system cannot find the file specified." What do I do …

Member Avatar for indrajeet6
0
443
Member Avatar for natha_peepli
Member Avatar for Stefano Mtangoo

Hi, I have a complex C++ code with gui. Each major gui division is independent class. Now these classes must 'talk' sometimes in operations like copy from division A and paste in division B. So I need to pass some pointers from one class to another. I was thinking of …

Member Avatar for Stefano Mtangoo
0
103
Member Avatar for anantk

I am aware that this is something that has been asked repeatedly, and that conio is outdated, it is completely non-standard, but I need do use BGI graphics(in Turbo C++ 3) for my school project and for that along with BGI I need conio too.. I convinced my teacher to …

Member Avatar for anantk
0
120
Member Avatar for zozanthonyzoz

Hi all, I need to have a program to word count remove punctuation and sort it in alphabetical order. I had done the word count portion but i am lost in removing punctuation and sorting in alphabetical order portion. Hoping to get some help. [code] #include <fstream> #include <iterator> #include …

0
194

The End.