49,766 Topics

Member Avatar for
Member Avatar for angel6969

Create a temperature class that internally stores a temperature in degrees Kelvin. However, create functions named setTempKelvin, setTempFahrenheit, setTempCelcius that takes input temperature in the specified scale, converts the temperature to kelvin, and stores that temperature in the class member variable. Also, create functions that return the stored temperature in …

Member Avatar for Fbody
0
2K
Member Avatar for tetron

There is probably a joke in the comment that I am missing but this post is going to give the design approaches to solving the problem posed by FirstPerson in his signature: find the last ten digits of x^x (x raised to the power of x) for all the positive …

Member Avatar for mrnutty
0
291
Member Avatar for MrYrm

Hi all, As a learning project I'm rewriting a spider i have in php to c++. One part of the spider is a multi-threaded downloader, all this downloader does is read urls from a text file download the page and save it. I would like the downloader to strip out …

Member Avatar for MrYrm
0
82
Member Avatar for Aliun

So, this is my version of battleship with single space ships instead of a ship with 2,3,4, and 5. The only issue is the cpu I programmed isn't always choosing five, or it's choosing spots not on the map, I am completely lost if you can offer any help at …

Member Avatar for Aliun
0
995
Member Avatar for aswin cp

Ive been told to do a program that prints the first [B]15 non-fibonacci series[/B] using 'while'...i got the fibonacci series correct, but cant find a solution for this... Here is my code for printing the first 15 fibonacci series... [CODE]#include<iostream.h> #include<conio.h> void main() { int n=1; int a=-1; int b=1; …

Member Avatar for mrnutty
0
1K
Member Avatar for martin_dore

Here is my problem. I have a class Template define like this. [CODE]// File Vecteur.h template<class Elem> class Vecteur : public AdenEtEve { public : ... BOOL bInserer (Elem &elemAInserer, MOT32 wIndice);` ... protected: Elem elem; Elem *pElem; MOT32 wNbElem; } template<class Elem> BOOL Vecteur<Elem>::bInserer (Elem &elemAInserer, MOT32 wIndice) { …

Member Avatar for martin_dore
0
108
Member Avatar for kilon666

I'm working on a program to write chemical reactions a certain way from a file, calculate the mass and check whether they are conserved. I have this code so far: [CODE]#include <iostream> #include <fstream> #include <string> #include <sstream> using namespace std; #define INDEX_H 0 #define INDEX_B 1 #define INDEX_C 2 …

Member Avatar for kilon666
0
112
Member Avatar for bori02082009

For example, if I have the number 142, how do I know it contains the digit 1, 4, and 2? So far, I've worked out that 142/100 =[B] 1[/B] 142 - (1*100) = 42 42/10 = [B]4[/B] 42 - (4*10) = [B]2[/B] So i can just use a looping system. …

Member Avatar for abdelhakeem
0
164
Member Avatar for piuygiu
Member Avatar for Nick Evan
0
33
Member Avatar for tux4life

Some things you need to know: [LIST] [*]This code is not efficient, if you want a more efficient solution, then turn to the STL algorithm [URL="http://www.cplusplus.com/reference/algorithm/next_permutation/"]next_permutation[/URL]. [*]When there are double characters (i.e. characters which occur multiple times) in the string to permute then some permutations will be generated multiple times. …

2
1K
Member Avatar for mr. bean

Hi I'm building a webservice in axis2c and wanna test it with a client. I build the skeleton code for the client using the wsdl2c tool in axis. Now, when I build the solution in Dev-C++, I get a lot of linker errors like the one mentioned in the title: …

Member Avatar for mr. bean
0
1K
Member Avatar for clusebalca

[b]Split from - [url]http://www.daniweb.com/forums/thread34812-2.html[/url] [/b] hi can you help me with my problem in c++ coding? my problem that in every two zeros it must fallowed by 1, to become valid if the input is not 001 like this it becomes invalid..... example: 001001001 - valid 001010001-invalid

Member Avatar for iamthwee
0
970
Member Avatar for mahesh kumar

hi i m mahesh i want to knw about the project on media player[QUOTE=mattybennett;660156]Hi all, Ok - there's nothing like a BIG challenge to start off my exploration into programming. Given that I'm a complete newbie with more build errors than a builder having a bad day (bad pun!), what …

-2
54
Member Avatar for vijaysoft1

I am stuck with one problem , please anyone help me to do this . The question is Write a function to modify a list ( [I]one dimensional array[/I] ) of numbers such that every number is replaced by the average of its immediate neighbours ( [I]the value just above …

Member Avatar for mrnutty
0
269
Member Avatar for KRal

/*I am a noob and can not seem to be able to pass a random number to cout. I have tried everything amd am looking for a little guidance*/ [CODE]#include <iostream> #include <ctime> using namespace std; class Fraction { private: int num; // Numerator int den; // Denominator public: int …

Member Avatar for jonsca
0
113
Member Avatar for rena0514

had to do a program that did a binary search for the number 5 but for some reason its not being found...here's my code whats wrong.. [code] #include <iostream> using namespace std; const int SIZE=15; int binarySearch(const int, int, int[]); int main() { int posints[SIZE]={10, 36, 87, 95, 100, 110, …

Member Avatar for mrnutty
0
86
Member Avatar for tennis

In this class, line 3 "char * pName" and last line "char * name" pName and name are pointers or strings? I think they are pointers but if they are pointers how can we do strlen(pName) and strcpy(name,pName) in the code? Thanks class student { public: student(char * pName="no name",int …

Member Avatar for jonsca
0
139
Member Avatar for soapyillusion

Hey guys I overall got this problem solved it has to allow the user to input numbers to do artithmitic functions to fractions. And the whole mathmatical works fine. But the professor wants it to loop, and i cant figure out a good way to loop it. The way the …

Member Avatar for soapyillusion
0
288
Member Avatar for HoldmysunnyD

My teacher issued an assignment for us to implement a stack and node class based off of his header files, and then to code a postfix expression calculator using the stack and node classes that we implement. When I tried to generate an instance of my stack class, VS threw …

Member Avatar for HoldmysunnyD
0
961
Member Avatar for bryanpognant

Hey guys so have an assignment for my computer programming class, i was wonder if you could help me out. im really at a loss here haha, this is basically what i have to do and if anyone has a similar program that would help me out that would be …

Member Avatar for WargRider
0
169
Member Avatar for KolosoK

Hello, I have a weird problem. I have a class implemented that looks something like the following: [CODE] class textBox { public: // default constructor textBox() { m_text = ""; } textBox(string text) { m_text = text; } string getText() { return m_text; } private: string m_text; }; [/CODE] Now, …

Member Avatar for hllsen
0
198
Member Avatar for TSaunders84

heres my code: [CODE]#include<iostream> #include<string> #include<iomanip> #include<fstream> using namespace std; struct WeatherInfo { string City; //Name of the city double Rainfall; // Total rain fall of all citys double High; //Highest temperature of all citys double Low; //Lowest temperature of all citys double Average; //Average temperature of all citys }; …

Member Avatar for TSaunders84
0
88
Member Avatar for ls3095

[CODE]#include<iostream> #include<cmath> using namespace std; int main() { float user1; float user2; float sum; char choice; for (;;) do { cout<<"Calculator"; cout << "Enter your first number" << endl; cin >> user1; cout << "Enter your function \n"; cout << "+ \n"; cout << "- \n"; cout << "x \n"; …

Member Avatar for WaltP
0
137
Member Avatar for react05
Member Avatar for wwsoft

hello , I am creating a map format for a game I'm making and I'm hoping to use xml. Can anyone tell me how to access elements using tinyxml ? or at least how create some sort of pain text parser ? Thanks in advance ! A Novice C++ Programmer

Member Avatar for wwsoft
0
109
Member Avatar for corby

ok so i need to create a cell class for a tic tac toe game. the cell class should have a row, column coordinate, and an internal and external display value. heres what i have so far. can anyone give me some hints or point me in a direction where …

Member Avatar for Fbody
0
147
Member Avatar for skorm909

ok so i worked on this during lunch at school since i was bored, but here it is so far. [CODE]#include <iostream> #include <cmath> int main() { using namespace std; int badguy1; int action1; int action; int att; int def; int health; int shop; int action2; int action3; int action4; …

Member Avatar for skorm909
0
416
Member Avatar for techie929

Hi everyone, I have to display a binary search tree in a tree format. For BST insertion, if the input contains the following F D R P V M N The resulting BST should be displayed as: [CODE=text] F +-- D | +-- NULL | \-- NULL \-- R +-- …

Member Avatar for techie929
1
131
Member Avatar for fugnut

Hello all, I am a major noob a C++ and need some help with managing case. we are to write program that asks the user to enter a temperature and a single letter, F for Farenheit or C for Celsius. The program should manage the upper or lower case input …

Member Avatar for fugnut
0
177
Member Avatar for RayvenHawk

I have a homework assignment for my algorithms class, we need to take up to 10 user inputted locations and then plot out the route from a static point, displaying every possible route to take. What I'm wondering is is there a way to randomly display a string array and …

Member Avatar for dusktreader
-1
87

The End.