49,761 Topics
| |
I have everything almost done, the only problem I have is that I can't seem to get the linked list to advance when the terms start out with different exponents and instead of just printing the results I will tie them into a third list. Can you see what I'm … | |
can someone help me complete this code please, on the ares i put comments please. thanks #include <stdio.h> #include <string.h> class wordRecord { public: char* word; wordRecord* next; void printWord() { printf("%s\n", word); }; }; class abstractWordList { private: void printWordsHelper(wordRecord* wordRecPtr) { if (wordRecPtr) { // Code omitted to … | |
Write a program to implement a survey that prompts respondents to enter an integral value within a specified range to indicate how they like a new product. Since the program must be adaptable to any arbitrary number of respondents and value ranges, define macro MAX_RESPONDENTS to represent the maximum number … | |
Hello, I'm trying to get the STL equal_range function to work on a data structure I've designed, but I may be trying to use the equal_range function in a non-standard way. Is there a way to get this to work? Basically, I have a vector of vectors of structures (elements) … | |
Here i have to define a function which will reverse a c-styled string. I have made 2 functions one using dynamic memory and the other not using dynamic memory. I would like to know of any improvements that can be made in the code. I would also like you to … | |
Ok I'm doing an assignment to create a solar system. I've gotten the program to function but having trouble with some of the colors for the planets. I'm wanting Venus to be gold & Mercury to be brown (or as close as possible). I have the Sun, Mars & Earth … | |
hey...! we were given this assignment to make a game in c++ using pointer, classes, structures etc! we were also asked to introduce graphics in the game to get bonus marks! i've coded the game but the problem is that i have no cluee watsoever how to introduce graphics in … | |
I am just starting to work with Visual C++ Express 2008 and have run into a situtation I could use help with. To add a new data source to a project I am told to start the data source configuration wizard, this I can do. Next I am to select … | |
I take one look at this project, define my structure.....and my brain goes numb. I don't know where to star..... ///////project/////// Write a program that dynamically allocates an array large enough to hold a user defined number of structures (string name and three double tests). Using a function, the user … | |
Hi. I am working on a little program that will be able to open files and read them. The problem is that i CANNOT tell the user to manually type the directory and the name of the file ! It would be madness. So i need to use GetOpenFileName dialog... … | |
int sum=0, a=0, b=0; for (a=1;a<3;a++) for (b=1;b<5;b++) sum+=b; cout <<"sum =" <<sum; The answer is 20, sure, but I have'nt got my head around how it actually works. Could someone explain it step by step please? | |
I get this error: [quote] error C2785: 'std::ostream &operator <<(std::ostream &,const Outsider<T>::Nested &)' and '<Unknown>' have different return types [/quote] When trying to compile the following code with VS2008: [CODE=cplusplus] #include <iostream> using namespace std; template <class T> class Outsider { private: class Nested { private: T myData; public: Nested(const … | |
Good day. I have a problem with matrices / arrays, i cannot resolve. I have no idea how to start... I have two 2D matrices and i want to overlap (mix?) one over the other, no matter what dimensions they have. For example : a = [ (1,2,3,4,5), (9,7), (0,0,0,0,0), … | |
I want to do a multithreading program in c++. How to create thread in C++. I made a class with methods start() , run() etc for this purpose. But how to give delays. Am not able to implement multithreading. Can anyone tell me how to do that | |
Q1: Write a program to implement a survey that prompts respondents to enter an integral value within a specified range to indicate how they like a new product. Since the program must be adaptable to any arbitrary number of respondents and value ranges, define macro MAX_RESPONDENTS to represent the maximum … | |
Hello friends, I'm working on a program that takes a number input from the user and recursively sums the number 'n' to one. For example, inputting a 5 would sum 1/5 + 1/4 + 1/3+ 1/2 + 1/1. I have sucessfully gotten the fraction sequence to display but I am … | |
ok i have 2 series of p... the user give which one was want... and then give the iterations that he/she want this is the series 4. P= sqrt(8*(1+ (1/9)+(1/25)+(1/49)+... )) 5. P= sqrt(24*((1/4)+(1/16)+(1/36)+(1/64)+...)) code:: first for series 4..... [code] int i; double: serieValue=0,pi=0; cout<<"Iterations"; cin>>i; for (long int n … | |
Hello! I want to find the position of objects on my sensor field. I have uploaded the diagram of sensor field attached In the figure S1-S8 are the laser sensor pointing into the field. While red and yellow are the balls [B] Case 1:[/B] if there is only one ball, … | |
how can i compute a code if i enter numbers then if i press any key its stops and computes the inputs of all no. | |
i couldnt figure out this any help anyone????? it should checked [TEX]if there an Appointment on the same Date and Time![/TEX] but its not. i can still put more then 1 record on the same date and time???? [CODE]void addAppRecords( ) { int number; system("cls"); //clear screen cout<<"\nHow many Appointments … | |
Hi,all I am implementing the required assignment and face compiler error which i do not understand. Here is my class: [CODE=c++] class fooPlayer { public: fooPlayerfunc(){}//doing something here char askYesNo(std::string question); }; class fooPlayerFactory { public: virtual std::auto_ptr<fooPlayer> MakePlayerX() const; virtual std::auto_ptr<fooPlayer> MakePlayerO() const; private: std::auto_ptr<fooPlayer> MakePlayer(char letter) const; std::auto_ptr<fooPlayer> … | |
Hey One and All, My teacher gave us a set of practice problems which are ones with addresses and she wants us to do the math out long hand and give her the answer by writing it out. On the test we will not be able to run it to … | |
Hi, this time I've borrowed a book called "Windows Game Programming for Dummies", albeit old it is still useful! However, I came across a problem writing a simple code the author made, namely the TextOut() The error it gives me at build time is as follows: [CODE]1>c:\users\shadow\documents\visual studio 2008\projects\g_app\g_app\main.cpp(75) : … | |
Hi, I am getting the following error in my code. [ICODE] malloc: *** error for object 0x3b0fe80: double free *** set a breakpoint in malloc_error_break to debug[/ICODE] When i debug it and do a backtrace i get the following [ICODE] #0 0x90c994a9 in malloc_error_break () #1 0x90c94497 in szone_error () … | |
Hi, I am having trouble with a C++ problem for school. Im writing a program that takes input for the highest and lowest temperatures of each month, and stores them in a 2 dimensional array. I then wrote 2 fuctions to find the average high and low temps. Part of … | |
[code]#include<iostream> #include<fstream> using namespace std; int main() { dnode<double> *listA = new dnode<double>; dnode<double> *listB = new dnode<double>; int val1; //first set of integers int val2; //second set of integers ifstream inFile; //declares the inFile //Read in a file to build the two lists inFile.open("lnkList.in"); //Open the input file //statement … | |
I need to sort a List store TreeView. By name and By Number. | |
Hi, I've got some c++ code(which i don't have much experience in). I'm trying to write the same code again in python but i'm not having much luck. The c++ code creates an array of x,y co-ordinates: [code=c++] for (double ix = 0; ix < nlat; ix++) { for (double … | |
Hey all, I have decided that in order to learn i will need to write code. So i am working on all the questions on my book. And as I am teaching myself i end up with no-one to scrutinize my code. [code=c++] #include <iostream> /************Declarations of Functions*********/ void func1(); … | |
Hello to every body I hope every one keep in best state. I want to help me in solve this problem in my Sheet IN TREE structuring If I use pointer to root of tree, it make run time error . I need to this pointer in 4 function [CODE]int … |
The End.