49,757 Topics
| |
Hello all, I have a text file set up as follows. 1 1 1 2 2 2 The program below is not reading the first line. The code below will only read 2 2 2. What am I missing here? main.cpp [CODE]#include <iostream> #include <limits> #include <cmath> #include <cstdlib> #include … | |
Hi, I'm about to start making some little program with input of type string which'll later be converted into numbers, but it has to pass the check is there any non-digit character. Considering I was lazy to search for functions like that I decided to make my own header for … | |
My professor has given us the fifo algorithm program and asked us to modify it to become the clock algorithm by using reverse_map to find a page table entry and then checking its reference bit. If the reference bit is set, clear it and go on. I am just completely … | |
[CODE]#include <iostream> using namespace std; template<class L> class LEST { L *date; int first; int last; public: LEST(int last); L dele(); bool Full(); bool Empty(); bool Add(L value); bool search(L value); void print(); }; template<class L> LEST<L>::LEST(int last) { this->last = last>0 ? last:100; first-1; date = new L(this->last); } … | |
I am trying to use FMOD library in a console application Visual c++ project.... But I can't really get it to work I will tell u exactly what i did... First, I added the following files to the project folder: [B]fmod.h , fmod.dll, fmod_errors.h , fmoddyn.h , fmodvc.lib , wincompat.h … | |
My assignment is to write a program that outputs the following columns of numbers using mathematical operators and the loop index. This is what I want the program to output: [CODE]1 10 0 1 1 0 2 20 1 4 2 0 3 30 2 9 3 0 4 40 … | |
Problem: Write a C++ program with at least 3 required functions to do the following. 1: Data file contains sales information for the Bilvet manufacturing company. Input data from file and generate a report similar to the one given below. ( Data to be inputted: salespersonID number, productID number, product … | |
hello, all! I am an absolute rookie in the world of C++ language, and not a good one either... I have an assignment to create a random number guessing game, and I am struggling with it. I have most of it done, but we have to generate the number of … | |
Hello, I am currently working on a project for human body detection and recognition. I am using OpenCV. So far I've concentrated on the facial detection and recognition. The detection works well using the haarcascade classifier provided from OpenCV. However I'd like to create my own classifier, I tried but … | |
Hello. I trying to solve this problem. The user inputs 4 numbers to each array (they are 2). I must output the common elements. So this is the problem i'm stucking with . Let's say p = 1,2,2,3 p1 = 3,5,1,2 the output is 2 1 3 1 2 but … | |
I am almost finished reading one of my tutorial books on C++. I made this program a little while back. The comments explain what the program does. There are still a few errors, like if you enter a character instead of a integer you'll be stuck in an endless loop. … | |
Hey guys, So I have to convert my previous code into a code using pointers and dynamic storage and the problem is, I have no idea how. I have already read on another forum's examples of Pointers and watched a few tutorials (simple ones) and read from my textbook. Unfortunately, … | |
short story short, I've got data file which looks like this: [CODE] PrekÄ—s pavadinimas Atvežimo data Pardavimo data Kiekis Kaina --------------------------------------------------------------------------------- Juodos vilnojinÄ—s kojinÄ—s 2011 10 28 2011 10 28 5 6.79 Smulkus cukrus 2011 11 19 2011 10 28 15 3.66 Pigus Batonas 2011 11 23 2011 10 28 … | |
Ok, I found this code after searching for days, and to my delight it actually worked. It loads a TGA file into the memory... but I have no idea about how to load it into an OpenGL texture that I can use to texture a cube. I have literally spent … | |
Write a program that counts number of words in a sentence and displays the average number of letters in each word. Your program should ask the user to type a sentence (or sentences) that are 80 characters or less. If the sentence is longer than 80 characters, truncate it and … | |
I'm doing a program that is supposed to reverse a string entered my the user using a recursive function, I almost have it solved except for one little elusive bug that I can not understand. [CODE] //****************************************************************************** //Programer: Kyle Willett //Course: CS-1513 //Program: 3 exercise 7 page 933. //Purpose: Reverse … | |
Hello! I have coded a compression technique and I am having trouble in measuring the speed of it. I tried to generate log of start time and end time, but compression time of same file varies a lot under windows. That may be happening because other processes would be consuming … | |
So wrote this code all in main and it worked then tried to put it into function, per assignment, and i'm getting three errors both in the last function where I call the previous functions to print. [CODE]#include <iostream> #include <fstream> #include <iomanip> #include <string> using namespace std; ifstream infile; … | |
Hello all, The program I am working on is calculation of areas (of shapes). For example, for triangle area calcuation I have: [CODE] else if (character == 't') { double b,h; cout << "Enter base: "; cin >> b; cout << "Enter height: "; cin >> h; area= h * … | |
Hello everyone. I've recently written a program which draws some stuff to a DC; however, on a screen invalidation, the things drawn on the DC, dissapear (get erased.) Does anyone know how one would be able to draw to this dc, and have whatever was drawn to the dc remain … | |
I managed to get a quicksort function to sort the numbers in a dynamically allocated array of structs, [code]struct Contact { char first[maxstring]; char second[maxstring]; int number; }; //and the dynamically allocated array, Contact *person = new Contact[numberofcontacts]; //The quicksort function I used to sort numbers is: void Quicksortnumber(Contact *person, … | |
So, I'm trying to write this program here are the listen instructions. 1. You are going to write a program that uses 3 input files and 3 output files 2. your program will include a function template that sorts an array of values in ascending order. the function will receive … | |
When I click the "Go" button I want the button event in "wxQuestionMain.cpp" to call "somefunction()" which is inside "otherFile.cpp". That works just fine. But I then want to change the text in the textbox "txtCtrl1" from inside "somefunction()" and that won't work because "somefunction()" is not part of the … | |
Here is the program assignment: [icode] Graph abstraction is important because it is used in many different areas of science, engineering, computer sciences and software engineering. For instance, the Internet makes use of graphs to represent the Internet router network configuration in order to determine the best route for forwarding … | |
Hi everyone, I seem to be experiencing some problem with the linking of header files. I'm sort of creating Date structures and I have the following files: [list] [*][b]Date.h[/b]: Class Date declaration [*][b]Date.cpp[/b]: Class Date functions definitions and auxiliary functions [*][b]DateFormat.h: Class DateFormat declaration (used to format Date objects) [*][b]DateFormat.cpp: … | |
Hi, Im currently making a program which would connect to a server which I got working perfectly, however I've gone to work on another feature for the program and that displaying the server details via an image. I've got the image I want its on the internet, but how can … | |
Hello, I have a problem in reading p5 PGM file: [CODE] ifstream::pos_type _Start, _End, _Size; ifstream::off_type _newStart; char * memblock; vector<vector<int> > initMatrix ; std::ifstream inf; inf.open("a.pmg", ios_base::in | ios_base::binary); if (inf) { std::string line; for (int i = 0; i<3 ;i++)//skip the first 3 lines that contain the info … | |
I have been running the program but it quits in the end on pressing alt+f5 it says BGI Error:- Graphics not Initialized(Use Initgraph) but i have sphecified the graphics driver properly and also egavga.bgi is also there in the folder bin | |
Hello, I have two arrays that contain different numbers that I need to compare with another array.. e.g. Array 1: 10 20 40 70 Array 2: 5 3 10 18 2 Basically, I want to write a program that calculates the highest value each array and then swops the values.. … | |
please help me using C++ to create the following hierarchy of classes; (1). a [B]Person[/B] class with fields for name (type String) and an email address (type String). it should contain two constructors: one without input , a second one with input name of type string and email of type … |
The End.