49,757 Topics

Member Avatar for
Member Avatar for JohnPhilipps

Good afternoon, I am having a hard time understanding how to use the "Friend" function prototype and the Friend function to move my rectangle. My programm with just the constructors, the properties and the functions work corectly until I put the "friend" function prototype and function. I would so much …

Member Avatar for JohnPhilipps
0
460
Member Avatar for vbx_wx

i am getting a Resul to large error when i try to connect a client to a server in windows,anybody knows why ?

Member Avatar for vbx_wx
0
89
Member Avatar for sfurlow2

For my project, we're supposed to read data from a text file (circlemath.txt) and the program should output data for the circle to a text file (circoutput.txt). The input file contains data specific for class Circle (x-coordinate, y-coordinate, radius, ascii character), and each line has the form (Circle1 data, operator …

Member Avatar for sfurlow2
0
104
Member Avatar for detito

Write a C code to Simulate the binary erasure channel (BEC) and the binary symmetric channel (BSC). The decoder should run for Nmax iterations or until it finds a codeword, whichever is earlier. Encoding: For iterative decoding problems, assume that the all-zero-codeword is transmitted • Frame error rate (FER): It …

Member Avatar for Nick Evan
-3
83
Member Avatar for turrence27

I am trying to merge two vectors, alternating elements from both vectors. And if one vector is longer than the other, alternate as long as possible then append the remaining elements from the longer vector. This is what I have so far: [CODE]#include <iostream> #include <algorithm> #include <vector> #include <iterator> …

Member Avatar for jonsca
0
2K
Member Avatar for corby

I need to find the difference of 2 sets. below are my functions for the union and intersection of sets in my driver-file. Is the difference set a combination of the two? [CODE] IntegerSet IntegerSet::unionOfSets(IntegerSet b) { IntegerSet c; for ( int i = 0; i < 101; i++ ) …

Member Avatar for WaltP
0
153
Member Avatar for jimJohnson

[CODE] I am finishing up my atm program and have an issue with my program. When I withdraw more than 300 it does not return an error message or show the amount withdrawed in my program. I am not sure if this is related or not but the deposit and …

Member Avatar for VernonDozier
0
503
Member Avatar for stankit

So I have to write a program to output whether a point is inside or outside a circle, but I can only get the program to ask me for one set of coordinates. [CODE]#include <iostream> #include <cmath> #include <string> using namespace std; bool promptYesNo (string question); int main () { …

Member Avatar for stankit
0
111
Member Avatar for MTW1989

Write a program to process bowling scores for players on a team. Calculate each player's series (the sum of his bowling games) and his average game score. Sum the players' scores for each game, and calculate the team's total for each game, the team's series, and the team's average game …

Member Avatar for WaltP
0
2K
Member Avatar for redworc53

I am a biology student taking a required C++ class. As a result, I am very unfamiliar with programming but I definitely have gained a new appreciation for it. We just finished cin and cout objects two weeks ago and this is our assignment. I have some of it finished …

Member Avatar for WaltP
0
2K
Member Avatar for daniwebrandom

I have a project where i need to create a C++ class that will use very long integers. The software should handle additions of integers of up to 50 digits. I already finished creating a class for sequence that we have to use too store the numbers. But my question …

Member Avatar for daniwebrandom
0
206
Member Avatar for tcstom

Hi, My program keeps coming up with an Access Violation after I moved the code manipulating my linked list from the main function to a sub function. Looking at it with the debugger, I found that the sub function destructs the linked list, and then the main function attempts to …

Member Avatar for tcstom
0
182
Member Avatar for callister

[code]#include <iostream> #include <cmath> double f1(double); double f2(double,double); using namespace std; int main() { double dx, dy,x=1.0, y=1.0,xnew,ynew,eps=0.0000001,err=1.0,m=1; while ( fabs(err) > eps ) { dx= -f1(x)/(3.0*sin(x)+cos(x)); dy= (f1(x)*sin(x)+f2(x,y)*(cos(x)-3*sin(x)))/3*sin(x)*(cos(y)+cos(x)*cos(y)); xnew= x+dx; ynew= y+dy; m = (xnew*xnew)+(ynew*ynew); err=sqrt(m); } if ( fabs(err) < eps ) cout<< "dx= " <<dx<<endl; cout<< "dy= …

Member Avatar for nezachem
0
291
Member Avatar for juniper2009

I would be very happy if you could explain to me clearly to understand the insertAtRear function. I want to make an insertation like [CODE] void insertAtRear(int i, string s, string n) { //??? } [/CODE] and than also need to disply the inserted data by using printList() with and …

Member Avatar for Phil++
0
82
Member Avatar for juniper2009

I would be very happy if you could explain to me clearly to understand the void insertAtRear() function. I want to make an insertation like void insertAtRear(int i, string s, string n) { //how can i implement this function // i need to }

Member Avatar for VernonDozier
0
154
Member Avatar for rizzi143

create a C++ program, using a queue that will interface to your car, to read out to you directions as you drive. You have been at a hockey game at Rexall Place. So you ask your GPS for a route home to your residence at King’s. You enter each instruction …

Member Avatar for rizzi143
0
120
Member Avatar for mebob

hi, i created a program to use bubblesort to sort numbers in an array, but when i try to display the new array, nothing appears on the command prompt. after some exploring, i figured out that it gets stuck in one of the loops in the sorting function. here is …

Member Avatar for WaltP
0
87
Member Avatar for Sorb3t3ro

I'm using Borland C++ 5.5, I code my programs using Edit, I compile and run my programs using console. Before, I was using Windows XP and I had no problem using Edit to code, compiling and running my programs using console. Also my programs were in [B]D:\My Documents\Borland\Programs [/B]and it …

Member Avatar for Sorb3t3ro
0
239
Member Avatar for katieJane

Hi I only have a simple query I am relatively new to c++ and I am trying to create 10 randomly placed items in a grid. I've used the following for loop: [code] for(int x=0; x<10; x++) { array[n1][n2] = aliveG; } [/code] and it only displays the item once, …

Member Avatar for Jiwe
0
86
Member Avatar for Nakeo

I have finished writing a program that uses Linked lists and reads in input from a txt file. When the program executes there is no output. I have been going through the code for awhile now and there are no syntax errors and i can not seem to find what …

Member Avatar for Jiwe
0
91
Member Avatar for honeyboynasa
Member Avatar for ayan2587
-1
134
Member Avatar for VilePlecenta

I have made a simple test application that I use to paint objects while I study and try to give them physics such as gravity, velocity, wind, momentum, etc. I have the app setup like this: [CODE]WM_PAINT PaintFunction(); break; DWORD CalculationsThread() { while( 1 ) { //-_-_Calculations here SendMessage( WindowsHandle, …

Member Avatar for VilePlecenta
1
113
Member Avatar for merse

A want to create some kind of global memory table. Every time when I create a specific kind of object, I wolud like to register it in the table, and save some data. Let assume that this "memory table" is a map, and a global variable. Let assume that I …

Member Avatar for merse
0
113
Member Avatar for joeman33

i need to write a function that will take these family codes and convert them into names, as shown below. i'm at a loss as to what to do. i'm thinking i need to do some kind of case thing. case 0 = drake; break; case 1 = spencer. i …

Member Avatar for WaltP
0
123
Member Avatar for skorm909

ok so heres my script [CODE] #include <iostream> using namespace std; using namespace std; int Unitedstates() { int action; char action1; cout << "you have chosen to learn more about the united states. Now What will you do?" << endl; cout << "1. The quality of doctors in the United …

Member Avatar for skorm909
0
88
Member Avatar for oakes121

The Assignment is as follows: Write a program that allows the user to enter foods and their calories into two arrays. Allow for UP TO 100 entries, although the actual number may be way less. When the user types "done" then stop asking for new entries. Next, prompt the user …

Member Avatar for WaltP
0
86
Member Avatar for shayshep

I am trying to write a program that finds sin(x) using the function double sine( double x, double tolerance, int limit, int & nTerms). I know I have to use the taylor series but I am having trouble getting started. [CODE] #include <iostream> #include <cmath> using namespace std; double factorial(double …

0
52
Member Avatar for Darkest Shine

I need to scan for the following input type using C: number letter number so i used the follwing: scanf("%d%c%d", &n1, &lett, &n2); Unfortunately with this, whenever I attempt to input a single number and press enter, scanf continues to expect another input. How can I adjust the program so …

Member Avatar for Salem
0
124
Member Avatar for kenji

Hi, After several google searches, yes I did actually bother searching, I was hoping someone would be able to help me out. I'm trying to figure out persistent hash tables and the internet seems to be woefully inadequate in information, I was hoping some one here had a link or …

Member Avatar for kenji
0
62
Member Avatar for pyroclastic

Hi everyone, This is my first post on daniweb! I'm fairly new to C++ and am trying to add sound to my application using FMOD. Now, I have managed to get sound playing correctly using FMOD, but I'm now trying to get all the sounds I want loaded, into a …

Member Avatar for pyroclastic
0
97

The End.