49,761 Topics
| |
Hello, I am trying to work on a program which is like this: There are several offices and each office is open on different times on different days. User inputs desired day and time and I have to return every office which is open on day and time user provided. … | |
Hey Everyone, I have some code here that I am trying to make. I made a two dimensional array that stores a high temperature and a low temperature then displays the average, but I am having a hard time getting it to display the Highest and lowest amount in the … | |
Hello, i am new in c programming it is just the second month i i deal with. I am really confusing about what i have to do with this exercise pls don't lough on me I hope for some help. That's what i have to do.. I have to modify … | |
I have a project that has four classes descending. Person is the first class, CollegeEmployee,and Student are classes that descend from the class Person. The class Faculty descends from CollegeEmployee and has a Boolean field that indicated whether the Faculty member is tentured, as well as methods that override the … | |
I want to copy one bitstream to another but it snaps in runtime assert error subscript out of range window pops up how to fix it? see the code: [CODE] #include <iostream> #include <fstream> #include "boost\dynamic_bitset.hpp" typedef boost::dynamic_bitset<unsigned char> Bitset; typedef std::vector<Bitset> byteArray; int main() { Bitset bitset, bitset2,b3,b4; bitset … | |
when would i ever/when would it be a good idea, to ever explicitly use __int8 nSmall; // Declares 8-bit integer __int16 nMedium; // Declares 16-bit integer __int32 nLarge; // Declares 32-bit integer __int64 nHuge; // Declares 64-bit integer over regular int?? in your program | |
Hello, i am new in c programming it is just the second month i i deal with. I am really confusing about what i have to do with this exercise pls don't lough on me :( I hope for some help. That's what i have to do.. I have to … | |
Hello world, ok so i need a suggestion for my code. this part of my code i need help [CODE]cout <<"\nEnter Each Sales Person # : "; cin >> salesPerson; while ( salesPerson != -1 ) { cout << "\nPlease Enter the product number: "; cin >> product; sales[ salesPerson … | |
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 … | |
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?? | |
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 … | |
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 … | |
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 … | |
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! | |
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 &, … | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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> … | |
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, … | |
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 … | |
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 … | |
// 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 … | |
I need to find the smallest number formed from the same digits of a given natural number n, using arrays. | |
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 … | |
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 … | |
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 ) … | |
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) … |
The End.