49,757 Topics
| |
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 … | |
i am getting a Resul to large error when i try to connect a client to a server in windows,anybody knows why ? | |
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 … | |
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 … | |
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> … | |
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++ ) … | |
[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 … | |
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 () { … | |
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 … | |
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 … | |
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 … | |
| 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 … |
[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= … | |
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 … | |
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 } | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
hi all can help me about code reverse 123 ->321. put help me | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.