49,757 Topics

Member Avatar for
Member Avatar for jake43

I need help to write this program. Create a data file that contains 15 integers, some positive and some negative. You may create the file in Notepad or any other text editor software. Save the file to the same folder your program will be in. Write a program that reads …

Member Avatar for poncho4all
0
84
Member Avatar for jko2326

Please help, this is for an assignment I need to turn in and I'm STUCK! I have no idea how to do this I've done programs but none like this calling differnt functions. this is what is in the data file. 100 Hammer 10 20 10 200 Saw 24 00 …

Member Avatar for poncho4all
0
419
Member Avatar for the great

Hello! I am having a problem in this program.In it a have to calculate the value of π from the infinite series π=4-4/3+4/5-4/7+4/9-4/11+..... by using this formula i have to print a table that shows the approximate value of π after each of the first 1,000 terms of this series. …

Member Avatar for StuXYZ
0
275
Member Avatar for ryancfc

Hi all, I am having trouble in finding out how to point to a private member variable. E.g. : [CODE] #include <iostream> using namespace std; class Angry_Dude { private: int health; int attack; } [/CODE] I want to point to the address of health. I know about the homework policy, …

Member Avatar for VernonDozier
0
90
Member Avatar for goody11

Hey, I was working on a program that would ask you a question and you had to put an answer. Well, when I went to compare the answer the user inputs with the right answer, it always comes up wrong and I was wondering if I did these lines of …

Member Avatar for goody11
0
131
Member Avatar for esesili

Hi all, I want the program below to calculate the doctor fee. I am doing it to learn class and inheritance concept. "[B]patient1.output(cout);[/B]" works correctly it gets [B]doctor_hour_fee[/B] from [B]doct1[/B] object. The problem is at [B]patient2.output(cout);[/B]. When I enter patient information it asks me to enter all member variables of …

Member Avatar for Sky Diploma
0
117
Member Avatar for the great

Hello! I am having a problem with my program.I have to write a program that find all pythagorean triples for side1, side2 and hypotenuse all no longer than 500. I have to use a triple-nested for loop that tries all posibilities. I know that the sum of squares to two …

Member Avatar for Salem
0
881
Member Avatar for the great

Hello! I am having a problem with my program.I have to write a program that uses repitition and switch statements to print the song "The Twelve Days of Christmas." One switch statement should be used to print the days (i.e "First","Second" etc). A separate switch statement should be used to …

Member Avatar for the great
0
1K
Member Avatar for Nogat21

I'm having a bit o a problem with inheritance. The context is this assignment i have in which we have to read from an mp3 file, extacting the informations within it as well as provide other informations not explicitly contained in it (for instance the total audio time of the …

Member Avatar for Nogat21
0
201
Member Avatar for vwyodapink

Last week for class I wrote the program below. This week part of our assignments are to the program take this program and modify it so the user can display the grade for as many students as they choose. What I am not understanding is, is it asking to be …

Member Avatar for VernonDozier
0
513
Member Avatar for Yee

OKay... I have a newbie question. [code=c++]#include <stdio.h> class Test{ public: Test(int x); }; int Test::Test(int x=0){ } int main(){ Test test(1); printf("%d", test.x); } [/code] My question is how to make the x variable of the constructor public. I have tried to add : [code=c++] public: int x = …

Member Avatar for mrnutty
0
105
Member Avatar for troels_y

im about to make a program, that changes the desktop background at morning, day and night... right now i uses a bat file, but it pops up all the time.. and that does not look nice.. i want it to be done through the c++ program (need the help before …

0
69
Member Avatar for hemant_chawla89

HI i am working with visualc++08 ,but alas i recently found that my compiler does not have resource pack which enables buttons ,menus etc. on including "resource.h" i get several compiler errors . someone please tell me where could i get the resource.h or a resource pack for the compiler …

Member Avatar for hemant_chawla89
0
87
Member Avatar for Smoking Bros

Hello everyone! The title is actually most of my compiler output! This is my entire compiler output: [CODE] multiple definition of `game' first defined here ld returned 1 exit status C:\Documents and Settings\Benjamin Dahse\Skrivebord\SDL 2D Platform Game\Makefile.win [Build Error] ["2D] Error 1 [/CODE] And now this is all of my …

Member Avatar for Salem
0
239
Member Avatar for neppy

[QUOTE=nunos;949210]Hi I would like to know if there is any way to obtain a float result from a division between two integers other than using "from __future__ import division"? I am not looking for the .0 'trick'. Example 4/5.0 = 0.8. I want to be able to do 4/5 = …

Member Avatar for neha arora
0
103
Member Avatar for athlon32

I've been learning DirectX, and overall, I'm really happy, it's not to hard and i can do tons of stuff. Now that I'm on more advanced things like meshes, i've run into a couple questions that i needed answering. 1. What is a good free program for making meshes? (One …

Member Avatar for kvprajapati
0
101
Member Avatar for macla
Member Avatar for cougarclaws

Is there an easier way to understand what this is doing step by step? I get very confused here, and I wonder if any of you fine people have a trick for breaking this down. I really want to get this, and understand the pattern, but what happens in the …

Member Avatar for cougarclaws
0
108
Member Avatar for prodigyaj

Hello all, This is my first post in thins forum and I hope a newbie like me makes some sense with my questions. I have a floating value float f = 5.3606; and I output a value cout<<pow(f,n); when n goes above 6, the representation of the floating number changes …

Member Avatar for vmanes
0
119
Member Avatar for dzhugashvili

hey, I am writing a password cracker. But I now have been thinking about separating the word generator from the actual encrypt and check function (for the sake of flexibility and convenience). I noticed John the Ripper does some operations like this. I was thinking something like this: [CODE]wordgen --stdout …

Member Avatar for dzhugashvili
0
310
Member Avatar for hardya

I recenty had a telephone interview in which I was asked about the internal implementation of the virtual mechanism. I described roughly that a table is compiled with the class (at the top of the memory block?) which holds pointers to the addresses of the appropriate method implementation according to …

Member Avatar for Frederick2
0
105
Member Avatar for adel_elrefaey

why he put this symble ( p-> ) before each variable? what is it means [code=cplusplus] p->fx[0] = (-p->x[0]*p->x[0]+p->x[1]); //-x1*x1+x2 /*function 2*/ p->fx[1] = (p->x[0]/(double)2.0 + p->x[1] + 1); for (i=0; i<NumFun; i++) if (MINMAX[i]==0) //minimiza p->fx[i]=-1*p->fx[i]; evaluaciones++; } /*Put here the contraints*/ void restricciones(individuo *p) { p->factible=1; //first constraint …

Member Avatar for mvmalderen
0
131
Member Avatar for neppy

need help 1. Which of the following options is a correct C++ instruction to calculate the number of containers filled with milk that can be sold? 1. nrContainers = totalLitres - litresLeftOver; 2. nrContainers /= 5; 3. nrContainers = totalLitres / 5; 4. nrContainers = totalLitres % 5; 5. nrContainers …

Member Avatar for neppy
0
258
Member Avatar for malugirl4

I have just completed my java code for the game engine maze I have been working on. We are told to download MARS and from java code it in assembly. I have never learned assembly. So I am completely lost. I so far downloaded MARS and uploaded my java code. …

Member Avatar for wildgoose
0
5K
Member Avatar for Eric_

Hi , i recently joined daniweb and it seems to be a nice site ;) Now to my problem: I am trying to reverse engineer an audio file format (not a common one). What i need is a function that can read the data from the file to the soundcard …

0
47
Member Avatar for imwan

I have written this code which reads a file and stores it in a struct. and from struct it saves the data in a new file. The file name is inserted by the user and new file name is also generated dynamically. But it is giving error. HEAP CORRUPTION DETECTED: …

Member Avatar for DdoubleD
0
1K
Member Avatar for cokaznsyco72

I'm having trouble with this program from right out of the book. Its just supposed to write an integer array to a file that it creates. I've compiled it without any errors, but when I try to run it, it fails and tries to debug. can anyone help me figure …

Member Avatar for WouterLindenhof
0
146
Member Avatar for gretty

Hello I have made a function that determines whether 2 words are an anagram or not. [B]My Problem is:[/B] that if the word contains 2 or more of the same letters(eg hello, arrest, gall) the function doesn't work even when the 2 words input are an anagram, If i input …

Member Avatar for mrnutty
0
516
Member Avatar for esesili

Hi everyone, I have a problem about inheritance and I can not solve it since Monday. I have two classes [B](Student_Patient and Emp_Patient) [/B]inherited from [B]Patient[/B] class. [B]Patient [/B]class and [B]Doctor [/B]classes are inherited from [B]Person [/B]class. The [B]Doctor[/B] class has a member function[B]double get_fee_of_doc() const;[/B] which returns a double …

Member Avatar for NathanOliver
0
117
Member Avatar for adel_elrefaey

#include <time.h> // double RAND_MAX = 4294967296.0; //2147483647; // void aleatorio(); void warmup_random(double); void advance_random(); int flip(double); double randomperc(); double aleatorios_0_1(); long rnd(long, long); double Rseed; /* Random numbers seed */ double oldrand[55]; /* Array of 55 random numbers */ int jrand; /* current random number */ /* Initialize random …

Member Avatar for adel_elrefaey
0
716

The End.