49,757 Topics

Member Avatar for
Member Avatar for ALi Tahir Khan

1.writte a program that generates output 10 20 30 Generate by using 10 2.write a program that take age from a person and converts into months and days . Please Help Thanxx

Member Avatar for deceptikon
-1
169
Member Avatar for lewashby

In the following small c++ program I'm trying to add '0' (zero characters) until the number of characters in the users input can be evenly divided by 3. I'v got it working except that it doesn't work when only on character is feed to the program. input -> 123 -> …

Member Avatar for vijayan121
0
178
Member Avatar for mbatipen

I'm a novice in c++ and intend to carryout a project on automatic control of an egg incubator. This project is to be used as an end of course defence. Soebody should kindly give me a c++ code for a temerature and humidity sensors. This will be used to programme …

Member Avatar for mbatipen
0
214
Member Avatar for talha.nehal

I use Dev 5.4.1 and so far I have not found libraries which work properly for making user-interface. Allegro or graphics.h or QT or some other libraries. For Qt I have heard that you need another IDE What about the others

Member Avatar for mike_2000_17
0
340
Member Avatar for Israel_1

Hi I need help with finding the area underneath a curve. Here is what I have so far; #include "stdafx.h" #include <iostream> #include <string> #include <cmath> using namespace std; struct term { float coeF; float exP; char name; }; struct function { int size; term terms[10]; }; struct Integral { …

Member Avatar for Israel_1
0
1K
Member Avatar for tiff2013

I have created a calcuator that takes in single ints and appends them together to make larger numbers and can do basic functions. Now I have to take this program the .cpp and the .h files and convert them to allow decimal point numbers. I am thinking about changing all …

Member Avatar for tinstaafl
0
129
Member Avatar for hahanottelling

Can anyone help me with displaying text in a C++ window? I've read the chapter 9 at winprog but it makes no sense to me. here's the code I'm using: [code]#include <windows.h> #include "resource.h" /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); /* Make the class …

Member Avatar for Nick_3
0
5K
Member Avatar for nitin1

int a=3; cout<<a++<<" "<<++a; what is the expected output of this problem ? It is undefined behaviour as it is updating value of "a" once more than once in a sequence point ? Correct me if i am wrong at any point. thanks if you can help me.

Member Avatar for vijayan121
-1
218
Member Avatar for hussein.gwadya

c++ program to compute the ammount due when a car parks in a parking lot according time taken. Customers are charged $0.75 for each full hour

Member Avatar for JorgeM
0
83
Member Avatar for NathanOliver

I was reading some articles on cplusplus.com and for kicks I read the template tutorial. At the very end of the section there is this paragraph: Since no code is generated until a template is instantiated when required, compilers are prepared to allow the inclusion more than once of the …

Member Avatar for vijayan121
0
157
Member Avatar for ohnbabygal

im tryin to compare the time it takes to calculate squareroot by the stdlib function and recursive function. everythin's workin good except the TIME thing. its givein me the same time. wat is wrong??? plz help me find it.. thank you guys! #include<iostream> #include<iomanip> #include<cmath> #include<cstdlib> #include<ctime> using namespace std; …

Member Avatar for cnplane
-1
161
Member Avatar for andrew.mendonca.967

Write a program to read the coefficients of a series of quadratic equations from a text file and print the associated roots, or appropriate errors if there are no real roots, to another text file. If a == 0, no solution, and if (b2-4ac) < 0 it has only complex …

0
147
Member Avatar for FriXionX

I was reading through some C++ code, and I noticed if(;;). I've tried to Google it and even search on here, but it seems to ignore the brackets in searches. Obviously I know what an if statement is, but what do the ;; mean inside the brackets? EDIT: nevermind, as …

Member Avatar for NardCake
0
206
Member Avatar for NardCake

Hello everyone! Recently I have been incredibly interested in language design/implementation. I have written multiple functioning language front ends (Lexer, Parser, some execution) and have decided a few things. My systems are getting ugly, there needs to be more abstraction I can't execute code in the parser -- it's just …

Member Avatar for NardCake
0
320
Member Avatar for Lp_baez

Hi Everyone, Sorry to be such a noob, but I am hopping you guys can help me out a bit. I keep on getting this error "expected an expression error" in the first open curly brace of the 'void playerCMD();' function and also in case 1. I am using the …

Member Avatar for cambalinho
0
190
Member Avatar for triumphost

Should I be using std::wstring or std::string and wchar_t or char? All this unicode stuff is confusing me. I want my application to work on both windows and linux without too many problems and changes but I'm considering unicode vs. ansi. Any ideas? I ask because I see many applications …

Member Avatar for vijayan121
0
1K
Member Avatar for vishalonne

What I know is Linear Search and Sequential Search are same, if my knowledge is correct then kindly guide me wether the below algorithm work for linear search or not as it is a Sequential Search algorithm. > Step 1. Initialize searcharray, searchno, length. > Step 2. Initialize pos=0. > …

Member Avatar for deceptikon
0
214
Member Avatar for pdwivedi

Hi all, I want to create all possible combinations of a full binary tree which must have exactly 4 leaf nodes and 3 internal nodes. I want to create it using recursion and tree must be simple binary tree not a binary search tree or BST. Kindly suggest algorithm to …

Member Avatar for pdwivedi
0
492
Member Avatar for jackmaverick1

I've been working on a small API/Library and I realized that I was returning memory that wasn't going to be consistently put on the heap or stack. So my question is this: when I return an object from a function in a Library, should that object be on the heap? …

Member Avatar for mike_2000_17
0
238
Member Avatar for pankaj.leon

> WE'll be taking inorder traversal of the tree and during the traversal will modify the right pointers only(using method "make_right") such that a linked list is formed having only valid right pointers. Then another method "make_left" is called to make the left pointers of the nodes point to valid …

Member Avatar for pankaj.leon
0
202
Member Avatar for vishalonne

Hello Everybody I am successful in displaying Diagonal Array elements, but failed to display Non Diagonal array elements I tried a lot but unsuccessful. Here is the code what I am try with - #include<conio.h> #include<iostream.h> void accept(int a[4][4],int size) { cout<<"Diagonal One:"; for (int i=0;i<size;i++) for(int j=0;j<size;j++) if (i!=j) …

Member Avatar for vishalonne
0
212
Member Avatar for Elixir42

Hi I'm trying to create an array of function pointers contained within a class, the C++11 way. Can I have some help with this as I'm getting a bit mixed up. Here's what I have done so far. They are made up classes to define the problem. #include <iostream> #include …

Member Avatar for Elixir42
0
273
Member Avatar for ProDev7

Hello again. I am stuck with this example: #define Listof(Type) class Type##List \ { \ public: \ Type##List(){} \ private: \ int itsLength; \ }; could anyone explain to me what is the intention and the point in this example? beacause I found this example in a book but not …

Member Avatar for ProDev7
0
141
Member Avatar for SalvatMollet

I'm working on an ATL dll, under C++ VisualStudio 2008. I would include an RichEdit 2.0 Control in an AxDialogImpl dialog. To use RichEdit 2.0 it is needed call AfxInitRichEdit2(). I did it in a non ATL project with no problems, but in the ATL project I have an C3861 …

0
59
Member Avatar for gcardonav

Hello guys: I am certain if I was not trying slef-teaching C++, that this question would have been answer before. What is the use of [inlinecode]using namespace std;[/inlinecode] ? I am not certain, I just know that when I use [inlinecode]#include<iostream>[/inlinecode] I have to appended. Simple question, but a matter …

Member Avatar for StanleyLau
0
4K
Member Avatar for andrew.mendonca.967

CSCI-15 Assignment #1 — Functions and files review (40 points), due September 9, 2013. Write a program to read the coefficients of a series of quadratic equations from a text file and print the associated roots, or appropriate errors if there are no real roots, to another text file. The …

0
99
Member Avatar for MasterHacker110

I am mainly into system dev, writing kernels and kinda just building everything from the ground up... But I also like game dev and is interisted in the whole concept. So I am going to make this easy, seing as a lot of things can change the output. A programmer …

Member Avatar for mike_2000_17
0
334
Member Avatar for waqar14
Member Avatar for deceptikon
0
88
Member Avatar for sharan_1

#include"Gradebook.h" #include<iostream> #include<conio.h> #include<string> using namespace std; Gradebook::Gradebook( int balance) { if(balance>=0) { balance=balance; Withdraw(balance); } else { cout<<"Balance can not be negative\n"; } } void Gradebook::Withdraw(int) { cout<<"Enter amount to withdraw\n"; cin>>credit; if(balance>credit) { cout<<"invalid credit greater than balance\n"; } if (balance<credit) { int total=balance-credit; cout<<"Current balance:"<<total; } getch(); …

Member Avatar for richieking
0
158
Member Avatar for andrew.mendonca.967

CSCI-15 Assignment #1 — Functions and files review (40 points), due September 9, 2013. Write a program to read the coefficients of a series of quadratic equations from a text file and print the associated roots, or appropriate errors if there are no real roots, to another text file. The …

0
79

The End.