49,757 Topics

Member Avatar for
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
185
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
816
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
101
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
546
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
281
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
Member Avatar for asif123

hi every body i m doing project of hand gestures detection using open cv .so pls guide me how i detect hand from video .

Member Avatar for asif123
0
163
Member Avatar for trantran

Here is my problem: 1) I have a tree which I want to act upon some branches indepedantly and simultaneously by different threads 2) The program is structured so that the processing of each branch is isolated after the main "manager" thread delegates the work to different thread: memory of …

Member Avatar for jmichae3
0
305
Member Avatar for stereomatching

I am studying CH4.3.2 of the book "C++ concurrency in action" , the book mention about "synchronizing with message passing" and give the reader some basic idea about it but without details(how to implement it). Could I find some simple examples which implement MPI by boost::thread? Since I haven't grasp …

0
49
Member Avatar for atiyehjoon

hello my dear friends I have read a book that was simple to learn c++,recently But in operator ovorloading threads ,I dont underestand many example for ovoreloading in another books & booklets for example : in the example below 1 // Fig. 11.3: PhoneNumber.h 2 // PhoneNumber class definition 3 …

Member Avatar for mike_2000_17
0
212
Member Avatar for rockerjhr
Member Avatar for nuclear
0
149

The End.