49,761 Topics

Member Avatar for
Member Avatar for ben1996123

Hi, I'm making a console application, text based game, and what I need to do is be able to do more than one thing at the same time. For example, I need to be able to make a timer that runs constantly, whilst the game is being played. I also …

Member Avatar for ben1996123
0
116
Member Avatar for roshan_iiita

I am using OpenCV for my program and i want the window always on the top. For that purpose i included "gtk/gtk.h" in my source code and using function: gtk_window_set_keep_above(GTK_WINDOW(cvGetWindowHandle("bfr_del")), TRUE); but it is not working. ( also not showing any error ) Please help me... i need it urgently. …

0
70
Member Avatar for PapaGeek

What project type is best for this application? I have the source for an old SSI emulator for website development. It is written in C using Visual studio 6. I want to convert it to C++ Visual Studio 2008. I started using a Windows Forms Application, but I’m not sure …

Member Avatar for PapaGeek
0
214
Member Avatar for VengefulToast

Hi forum, I just need help on my code. I am trying to find all the Armstrong numbers from 100-999(i.e. when the cubes of three digits added together equal the number - 1^3 + 5^3 + 3^3 = 153.) My code works until it gets to line 93, then it …

Member Avatar for skaa
0
656
Member Avatar for RaoxFaello

I'm new at programming, I was asked to create a program to find the GCD (Greatest common divisor) of two numbers my friend helped me create this program. All i am asking is how does it function?, I know how the whole program works (If... If else, While, Looping, Modulo …

Member Avatar for Schol-R-LEA
0
119
Member Avatar for coroshea

My primary objective right now is to get the program to display the following, when the user presses 1 at the main menu: Size of 1st pizza order: Small Topping of 1st pizza order: No topping Size of 2nd pizza order: Small Topping of 2nd pizza order: No topping I …

Member Avatar for Schol-R-LEA
0
169
Member Avatar for pato wlmc

Well, i'm pretty much a newbie into programming, merely because i'm just 15, but i really like informatics ( specially programing ) but i'm not that wealthy so, i can't pay for private teaching, or anything like that. But if you want to, you can, that's what i say. I've …

Member Avatar for Tumlee
0
5K
Member Avatar for subith86

Hi all, Here is a short summary of my piece of code. [code] double availableUnits = calculateAvailableUnits(some arguments); int minimumRequiredUnits = getMinimumRequiredUnits(some arguments); std::cout<<"minimumRequiredUnits = "<<minimumRequiredUnits<<std::endl; //prints 30 std::cout<<"availableUnits = "<<availableUnits<<std::endl; //prints 30 if (availableUnits < minimumRequiredUnits) { //throw exception; } //rest of the code [/code] Even though both variables …

Member Avatar for Tumlee
0
190
Member Avatar for Zssffssz

I want to get unix time in my program, google just brought up how to get time on a unix system (I'm on a dos/windows system). Is there an easy (can fit in less than 20 lines of non-system dependent functions and without any API or WIN32 [unless simple] functions) …

Member Avatar for vijayan121
0
848
Member Avatar for pingpongplaya

I have this assignment for adding two polynomials using operator overloading. I am new to C++ and am having trouble putting the pieces together for the operator overloading portion of the code. I understand how to add two poylnomials together, I just don't know where to begin to put down …

Member Avatar for pingpongplaya
0
4K
Member Avatar for alaa sam

hi everyone I have been programing in c++ for a while now, but I'm asked to write project in c#, so is hard to learn it ?? also I have never wrote a program with interface , so is it possible to write console application then build the interface ? …

Member Avatar for alaa sam
0
120
Member Avatar for Limiter

Okay, I am still trying to get used to C++ since I mostly write in Java. I am also new with the two constructor thing mentioned in detail below. Here, I am investigating on writing a class with two constructor. That is, I have heard that you are allowed to …

Member Avatar for Limiter
0
206
Member Avatar for Unethikal

So I have three files all in the same folder: dtime.h, dtime.cpp, and testapp.cpp dtime.h: [CODE] //This is the header file dtime.h. This is the interface for the class DigitalTime. //Values of this type are times of day. The values are input and output in //24 hour notation as in …

Member Avatar for WaltP
0
281
Member Avatar for Dakot

hello , let me know , what is the best way to learn c++ efficiently , reading c++ books and doing exercises based on the each capter , or read a book , then to solve exercises?. I'm waiting a reply from those experienced people . Thanks.

Member Avatar for Panathinaikos22
0
181
Member Avatar for ThatGuywithCode

So basically I need to find a way to evaluate an infix that's been converted into a postfix. The code below takes an entered infix and converts it into a postfix but I don't know how to take that postfix and evaluate it. Every single tutorial I've seen evaluates a …

Member Avatar for WaltP
0
228
Member Avatar for B031110034

Insert a few integer numbers between -100 and 100. Determine and print how many negative numbers and how many positive numbers have been inserted. Insert the value 0 to stop inserting.

Member Avatar for WaltP
-1
64
Member Avatar for mc3330418

I am slowly understanding functions, but I can't completely wrap my head around it yet. What is the purpose of function with nothing in the parentheses? Like this something(). Also, is there a way to write a function and then have it output what is going on in that function? …

Member Avatar for WaltP
0
103
Member Avatar for coolbeanbob

Hello, I am getting the following error from line 108. I'm trying to find information on the error. The elapsed_time function returns a double, so I'm not sure where there is a problem. error C3867: 'Timer::elapsed_time': function call missing argument list; use '&Timer::elapsed_time' to create a pointer to member [CODE]#include …

Member Avatar for coolbeanbob
0
144
Member Avatar for stereomatching

I have some question about boost::promise After studying the website of boost and "C++ concurrency in action" I still can't get the idea of boost::promise According to the book(if I have no make any mistake) boost::future is designed for one off event you could wrap the task by packaged_task and …

Member Avatar for stereomatching
0
547
Member Avatar for morganJohnson

I'm working on a small concept demo for a friend and I'm stuck on the UI. I'm trying to build something akin to an FPS interface (using mouse-look and the iconic WASD). I'm working in a Windows environment (Win7 to be precise), so I figured I'd use the standard Windows …

Member Avatar for morganJohnson
0
194
Member Avatar for serenaL

[B]Perfect number cousins[/B] 6 is a perfect number. but 220 and 284 are perfect number cousins. because the sum of the divisors of 220 is 284 and the sum of the divisors of 28 is 220. so they are called perfect number cousins. write a program that finds and writes …

Member Avatar for mlesniak
0
142
Member Avatar for deliezer

Hi, I would like to write a member function with a default argument, but the value of the default argument I would like to use is the value of the classes data member [CODE] class testdf {// testdf private: const int _defaultVal; public: testdf() : _defaultVal(1) {} int testMF(int arg …

Member Avatar for deliezer
0
135
Member Avatar for jefgreen

I'm trying to isolate a first name, space, middle initial, space, and last name. The full name is given by the user. The only problem I'm having is isolating the middle initial. Current code: [CODE]#include <cstdlib> #include <iostream> #include <string> using namespace std; int main(int argc, char *argv[]) { string …

Member Avatar for WaltP
0
96
Member Avatar for coolbeanbob

Not sure if anyone is familiar with column sort. I have this very close to working, but there are a few instances where the numbers are out of order. They occur at the beginning of each new column. I am looking for bugs in my transpose(), reverse_transpose(), shift(), and reverse_shift() …

0
70
Member Avatar for SSight3

I've tried searching for articles that relate to this issue, but all I keep finding are articles about people who don't know how to define constructors/can't call the parent constructor/etc and I think this will cut straight to the chase. The problem code is as follows: [CODE] #include <stdio.h> class …

Member Avatar for SSight3
0
283
Member Avatar for roshan_iiita

I am making a application for maping some keyboard shortcuts to some event. So, i need detecting the keyboard shortcuts pressed after clicking a button. For Example, i have a button having text on it "change". When i click on it text on it changes to "press keys" then i …

0
69
Member Avatar for rohan121212

hey i just switched from turbo c++ to dev c++ i cant run the following program please help #include<iostream> using namespace std; int main() { int n; int k; cout<<"Enter the values\n"; cin>>n; cin>>k; if (n>k) {cout<<"The value entered first is greater ";} else {cout<<"The value entered 2nd is greater";} …

Member Avatar for Schol-R-LEA
0
98
Member Avatar for Wootens

hey guys, I'm writing a program and trying to output data to a file and I'm getting this error: 1>------ Build started: Project: GenericProgram, Configuration: Debug Win32 ------ 1> Source1.cpp 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\fstream(1116): error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>' 1> with …

Member Avatar for vijayan121
0
157
Member Avatar for nerdygirl118

I am inserting all of the words in the dictionary into the unordered_set STL. For the life of me, I cannot figure out how to override the default hash function for the unordered_set. Can someone please point me in the right direction? I cannot figure out the syntax. Thank you …

Member Avatar for vijayan121
0
200
Member Avatar for Muhammad Anas

Question: Write a single statement that chooses a random number from each of the following sets: a) 2,4,6,8,10 b) 3,5,7,9,11 c) 6,10,14,18,22 I wrote the following statement for the set (a): [CODE](1 + (rand() % 5)) * 2;[/CODE] but I am unable to write ones for sets (b) and (c). …

Member Avatar for Muhammad Anas
0
3K

The End.