49,761 Topics

Member Avatar for
Member Avatar for LopezGG

Hi , I have a 2 D matrix which is a vector <vector> type. I wan to find out the unique rows. To use std::unique the rows have to be sorted. I tried using std::sort with a predicate. But sorting does not work . Could someone help me [code] typedef …

Member Avatar for LopezGG
0
163
Member Avatar for borchu

Hi, my question is simply but a little bit tricky; let assume that there are two array array1 = (2, 5, 6, 1, 7) and array2 (3, 2, 6, 8) and after function setUnion new array or use pointer return (2, 5, 6, 1, 7, 3, 8). Below my code …

Member Avatar for mazzica1
0
563
Member Avatar for sheennave

[CODE] System::String ^name_string; SqlCeConnection ^sqlConnection = gcnew SqlCeConnection("Data Source=Northwind.sdf"); sqlConnection->Open(); SqlCeCommand comSelect = gcnew SqlCeCommand("SELECT * FROM tablo WHERE id = 33 ", sqlConnection); SqlCeDataReader ^reader = comSelect->ExecuteReader(); name_string = reader["name"]->ToString(); sqlConnection->Close(); [/CODE] What's the mistake on the code above ? :?:

Member Avatar for sheennave
0
126
Member Avatar for libathos

I'm writing a project in xlib and have a problem concerning the colors.I use unsigned long type variables for storing the color values.does anybody know how can i take the red green and blue values of each color?

Member Avatar for libathos
0
105
Member Avatar for NickPatton

I'm working on a program that takes 5 integers from input and then prints out the smallest and second smallest of those integers. The program correctly outputs the smallest number but the program often outputs the second smallest number incorrectly because of ordering. For example, if I enter 33, -6, …

Member Avatar for mazzica1
0
3K
Member Avatar for coolbeanbob

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 …

Member Avatar for coolbeanbob
0
164
Member Avatar for MrEARTHSHAcKER

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 …

Member Avatar for MrEARTHSHAcKER
0
207
Member Avatar for SnoBunny85

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 …

0
145
Member Avatar for greimykudau

[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); } …

Member Avatar for greimykudau
0
159
Member Avatar for omarelmasry

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 …

Member Avatar for william90049
0
315
Member Avatar for NickPatton

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 …

Member Avatar for NickPatton
0
240
Member Avatar for Xclio

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 …

0
57
Member Avatar for ChanelN19

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 …

Member Avatar for frogboy77
0
323
Member Avatar for dolly_olaide

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 …

Member Avatar for dddua
0
814
Member Avatar for Dakot

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 …

Member Avatar for Dakot
0
8K
Member Avatar for tedman102

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. …

Member Avatar for mazzica1
0
1K
Member Avatar for JPyo

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, …

Member Avatar for mazzica1
0
135
Member Avatar for vlaskiz

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 …

Member Avatar for vlaskiz
0
153
Member Avatar for Jungletoe

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 …

Member Avatar for myk45
0
1K
Member Avatar for eblanco1

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 …

Member Avatar for Clinton Portis
0
233
Member Avatar for Kyle Willett

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 …

Member Avatar for Kyle Willett
0
209
Member Avatar for theprofoundgeek

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 …

Member Avatar for ExpertsGuide
0
312
Member Avatar for mc3330418

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; …

Member Avatar for mc3330418
0
208
Member Avatar for Jack_Frost

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 * …

Member Avatar for Narue
0
168
Member Avatar for PixelExchange

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 …

Member Avatar for PixelExchange
0
94
Member Avatar for Biff123

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, …

Member Avatar for Narue
0
118
Member Avatar for Ravic85

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 …

Member Avatar for griswolf
0
765
Member Avatar for crankyslap

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 …

0
122
Member Avatar for crc0002

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 …

Member Avatar for mazzica1
0
1K
Member Avatar for mikrosfoititis

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: …

Member Avatar for mikrosfoititis
0
290

The End.