49,755 Topics

Member Avatar for
Member Avatar for ffmwheeler

I am having a problem with my code for an assignment. I am to take the a dice and roll it 100 times, output the random results, and then ask the user if they would like to roll it again. My only problem is the second and subsequent times the …

Member Avatar for ffmwheeler
0
111
Member Avatar for ayeshakanwal

i m trying CvRunningAvg() function by passing two IplIMages , alpha value and a NULL mask value. it gives me some runtime terminal error. plz can anyone help me??

Member Avatar for jonsca
0
223
Member Avatar for tomtetlaw

I'm trying to make a memory pool, I've got everything sorted out except for one thing: the allocation. I have no idea how to return a segment of the data in the pool. I have it like this [icode]byte *m_pData;[/icode]. How would I be able to return a segment of …

Member Avatar for tomtetlaw
0
258
Member Avatar for joe00

i have the following code but i can not make the color work. where is the problem? #include <iostream.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include <math.h> #include <graphics.h> #include <dos.h> #include <bios.h> #include <ctype.h> float xw[8],yw[8],zw[8]; float xe[8],ye[8],ze[8]; int MR[12][2]={{0,1},{1,2},{2,3},{3,0}, {4,5},{5,6},{6,7},{7,4}, {0,4},{3,5},{2,6},{1,7} }; // ¬ ббЁў ॡҐа int pg[6],pr[12]; int …

Member Avatar for jonsca
0
177
Member Avatar for petmol

Hi everyone, I'm kinda new to this - both to DaniWeb and to C++ programming, so I hope you'll bear with me and my rookie questions. Anyways, I'm trying to build a little C++ program that my daughter can use to practice multiplication. It's supposed to receive two numbers and …

Member Avatar for petmol
0
127
Member Avatar for zartasha*

HI, I NEED HELP(c++) actually i make a programme through array in which even no.s print.its an integer type.array size is 20. please help me how can i do this!

Member Avatar for jonsca
0
66
Member Avatar for misfit956

Hello, I'm taking a c++ class and I'm very new to this. I have a project due where I'm to change a program from static memory to dynamic memory an help would greatly be appreciated it. #include <iostream> #include<fstream> using namespace std; // Function Prototypes void getArrays(int [], int &, …

Member Avatar for misfit956
0
129
Member Avatar for Suzie999

After my last project, I passed the finished job onto a friend to test. She reported that when she tried to run it, she was pesented with an error that some dll files were missing (Im sorry I cannot remember them now), I searched while on the phone with her …

Member Avatar for Suzie999
0
112
Member Avatar for shakssage

Hello. I'm trying to print some text using printDocument. I've managed to print out the text I need into a pdf. The text is taken from the database which is initially made when the windows form loads. The problem is: Once it prints, it shows the pdf, which is fine …

Member Avatar for shakssage
0
233
Member Avatar for puretnaant

Hi, I'm having trouble displaying the numbers in the file on the screen. The numbers are in the .data files but i cant get them to display. [CODE]//****************************************************************************** // Exercise: Homework 07 Arrays and pointers // This program reads two sets of integers from the text files A.data and B.data. …

Member Avatar for misfit956
0
148
Member Avatar for ELewis08

I saw the same thing I'm about to post on here earlier, but the difference is that I wrote the program, but it doesn't do anything save compile. The code's a bit sloppy, and I'm just not quite sure where to begin with the bugs. The actual assignment is as …

Member Avatar for Khaled Qawasmeh
0
330
Member Avatar for ScreamingPsycho

Hello, I am having trouble with this Hangman problem. In line 179, the wrong guesses are supposed to add up. I can't get the 'else' statement (line 176) to work. When i guess a wrong letter, it does not add up the wrongGuesses. What could be the problem? Any help …

Member Avatar for ScreamingPsycho
0
143
Member Avatar for Wolf CCMLG

I am having a difficult time with a BitStream class. I need to overload the extraction and insertion operator for the classes, but I am at a loss. Here is what I have so far. Any guidance is appreciated. [CODE] #ifndef BITSTREAM_H_ #define BITSTREAM_H_ #include <iostream> #include <fstream> #include <vector> …

0
69
Member Avatar for pato wlmc

Well, I know that for this I need a graphic library but which one do you recommend? I'm working on Windows, with VISUAL C++, and I know I can use windows libraries, or something, but there are a few problems with that (Mainly that I don't wanna use them). Also, …

Member Avatar for myk45
0
3K
Member Avatar for miturian

Job: my class "network" contains a vector "taus". I wish "network" to be able to find the indexes of the n smallest elements. My first idea was along the lines (this is mostly meant as pseudo-code): [CODE] #include<algorithm> #include<vector> #include<cstdlib> class network { vector <double> taus; vector <int> nsmallest; vector …

Member Avatar for StuXYZ
0
1K
Member Avatar for jainpratik2

Hi Folks, I have stuck in problem. I want to record keyboard events like key up and key down in Linux OS but I couldnt able to find any proper answer. I have got function but thats lib is very specific to Dev C++ in windows.[CODE]void GenerateKey(int vk , BOOL …

Member Avatar for jainpratik2
0
746
Member Avatar for LillianIs

// Postfix evaluation.cpp : Defines the entry point for the console application. [code] #include "stdafx.h" #include <iostream> #include "stackNew.h" #include <string> #include "stdlib.h" #include <cctype> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char Exp; string postfix; stackNew Operands; float item1, item2, result; cout<<"please enter the exp<B></B>ression you want …

Member Avatar for WaltP
-1
696
Member Avatar for dflor

I need to find the smallest number formed from the same digits of a given natural number n, using arrays.

Member Avatar for WaltP
0
329
Member Avatar for mocha8688

I have a text file to be read "Mary had a little lamb its fleece was white as snow and everywhere that Mary went, the lamb was sure to go!". The program should do the following: 1. count number of words in file 2. print all words, one per line …

Member Avatar for WaltP
0
142
Member Avatar for yuri1969

Hi, I have prolly very noobish question. I compile my program separately with GCC by: [CODE]gcc -O2 -Wall -c foo.c[/CODE] I just wat to ask if there is a chance to specify the output destination of [B]foo.o[/B] file. Now the output is forwarded to the makefile dir. Thank you for …

Member Avatar for yuri1969
0
2K
Member Avatar for motherboardlove

Say I have this code: [CODE]BOOL WINAPI ActivateActCtx( HANDLE hActCtx, ULONG_PTR *lpCookie ); DWORD WINAPI EnumerateLocalComputerNamesA( COMPUTER_NAME_TYPE NameType, ULONG ulFlags, LPSTR lpDnsFQHostname, LPDWORD nSize ); [/CODE] And I need a C++ script to automatically turn thousands of those into something like this: [CODE]BOOL WINAPI ActivateActCtx( HANDLE hActCtx, ULONG_PTR *lpCookie ) …

Member Avatar for motherboardlove
0
213
Member Avatar for carver90

Make a program that: a)create / read prepared text file with random figures b)search the pointed from the user value with the method with search step c)demand is realized with two different steps 2 <= k <n d)count comparisons during the search in both cases (for both values of k) …

Member Avatar for SgtMe
-2
93
Member Avatar for MrJNV

I need help figuring out if two numbers are co-prime. So far I have this (prime() is a bool function) [CODE]void GetE(int& e, int& result) { int random = rand(); do{ while(prime(random)) { if(random < result) e = random; else random = rand(); } while(!prime(random)) { random = rand(); } …

Member Avatar for arkoenig
0
600
Member Avatar for mocha8688

I have to write a slot machine program where theres 3 wheels. wheel 1 = cherry, cherry, cherry, plum, plum, bell, bar wheel 2 = cherry, cherry, plum, plum plum, bell, bar wheel 3 = plum, plum, bell, bar, cherry cherry. when wheels "spin", output should show three items from …

Member Avatar for mocha8688
0
2K
Member Avatar for harryhaaren

Hey guys, I written a base class (AudioTrackElement), and derived a class from there (Looper) and another (VolumePan). The looper class implements functionality, while the AudioTrackElement is there just so I can hold many Loopers and VolumePan objects in the same vector. The problem: I can create a [icode]std::vector<AudioTrackElement>[/icode] no …

Member Avatar for harryhaaren
0
227
Member Avatar for Atilly11

My assignment asks me to Implement a Linked List class with FoodItem as the objects to be inserted in the class, and implement a PrintList function member that prints the name of each food item in the list. Implement a SelectPrint function member that only prints the food item names …

Member Avatar for daviddoria
0
118
Member Avatar for centerline00

[B]Program goal[/B]: user input for 2 equations to evaluate the operator signs. i.e. 1 * 2 + 4 - 4 and 5 - 2 * 6 + 9 would be the same --> " * + - " in both, order does not matter. [B]Output[/B]: cout saying match or not …

Member Avatar for daviddoria
0
190
Member Avatar for aquario20

hi , i have this assignment but i don't know how to find the structured ? the program needs to use the structure that stores the following data: Drink Name Drink Cost Number of Drinks in Machine and we need to create an array of 5 structure with this: Drink …

Member Avatar for daviddoria
-1
72
Member Avatar for Storchillarn

Hello! I'm trying to alter a raytracer program which is supposed to create a picture of 25 spheres. It's an exercise in optimization so I'm basically trying to make the program run without any unnecessary code, making the program specific for the intended output. I'm using a C++ array to …

Member Avatar for daviddoria
0
122
Member Avatar for shubham_shkl

Hi, I am engineering student, currently working in a project in the field of image processing. Project would involve extensive use of MATLAB or Open CV. I have past experience of working in project involving mobile application development and subsequent deployment on mobile platform. I would like to discuss various …

Member Avatar for daviddoria
0
138

The End.