49,761 Topics
| |
Ive been working on this poker program for a while now and ive tried several different ways to make a poker game...i have to make it using very basic c++ ...ill try to post what i already have done | |
I'm supposed to write a function that takes an input, and then outputs a set number of digits based on an array. The code I have works for the numbers 1-10, but anything above that messes up because it goes on to a value that doesn't exist in the array. … | |
Hi guys, I'm just starting out and I'm having a little problem. When I run an application, it closes by itself right away. A few days ago I went to the Local Library and picked out "Sam's Teach Yourself C++ in 24hrs - I know it's a lie" It came … | |
i wanna know that if a program consists of 10 lines n if we compile it , it shows increased no of lines compiled why:icon_question: | |
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 … | |
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 … | |
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. … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 = … | |
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 … | |
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 … | |
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 … | |
[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 = … | |
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 … | |
Hi, How to get MS SQL database size using API. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … | |
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: … |
The End.