49,761 Topics

Member Avatar for
Member Avatar for scuzzo

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 …

Member Avatar for NathanOliver
0
105
Member Avatar for nokiolurv

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 …

Member Avatar for Sky Diploma
-1
120
Member Avatar for vksmaini

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 …

Member Avatar for rishabjain
0
315
Member Avatar for andyT

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) …

Member Avatar for andyT
0
186
Member Avatar for Sky Diploma

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 …

Member Avatar for tux4life
0
135
Member Avatar for RayvenHawk

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 …

Member Avatar for mcriscolo
0
111
Member Avatar for agentx

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 …

Member Avatar for RayvenHawk
0
108
Member Avatar for DaveD3

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 …

Member Avatar for DaveD3
0
131
Member Avatar for skisky

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 …

Member Avatar for Absaar
0
154
Member Avatar for Prahaai

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... …

Member Avatar for Alexander22
0
2K
Member Avatar for LucyB

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?

Member Avatar for rahul8590
0
109
Member Avatar for paolomontero

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 …

Member Avatar for paolomontero
0
151
Member Avatar for Prahaai

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), …

Member Avatar for rahul8590
0
140
Member Avatar for lulusweety

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

Member Avatar for lulusweety
0
80
Member Avatar for jagdeep89

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 …

Member Avatar for ndeniche
-1
361
Member Avatar for Grn Xtrm

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 …

Member Avatar for Grn Xtrm
0
789
Member Avatar for Akis2000

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 …

Member Avatar for Akis2000
0
113
Member Avatar for Tiwana

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, …

Member Avatar for Tiwana
0
146
Member Avatar for ongpong

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.

Member Avatar for Ancient Dragon
0
114
Member Avatar for pczafer

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 …

Member Avatar for ArkM
0
137
Member Avatar for shasha821110

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> …

Member Avatar for MrSpigot
0
106
Member Avatar for songweaver

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 …

Member Avatar for JasonHippy
0
88
Member Avatar for ShadowScripter

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) : …

Member Avatar for ShadowScripter
0
318
Member Avatar for guest7

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 () …

Member Avatar for guest7
0
157
Member Avatar for Adexter

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 …

Member Avatar for Adexter
0
101
Member Avatar for bmcutler011

[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 …

Member Avatar for Ancient Dragon
0
103
Member Avatar for valtikz
0
61
Member Avatar for breatheasier

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 …

Member Avatar for vegaseat
0
264
Member Avatar for Sky Diploma

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(); …

Member Avatar for lqdo
0
354
Member Avatar for mini programmer

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 …

Member Avatar for mini programmer
0
108

The End.