49,761 Topics

Member Avatar for
Member Avatar for crackerjr

Write an application that prints a summary report for a poultry farm. The farm has seven (7) chicken coups each numbered 1 to 7. When a farmer collects eggs each morning and evening, he records the coup number and the number of eggs collected from the coup. The data for …

Member Avatar for deceptikon
0
122
Member Avatar for Abhineet.Ayan

Hi All, I am implementing a recursive registry delete using RegOpenKeyEx, RegDeleteKey and RegEnumKey. **Problem::** Though the code works perfectly fine for Vista x86/x64 and Win 7 x86/x64 but fails on XP for some keys in HKCR **Problem Area::** HKCR\Installer\SomeKey **Error Code::** 87 (INVALID_PARAMETER) **Weird Behaviour::** Deletes the key the …

Member Avatar for Abhineet.Ayan
0
1K
Member Avatar for ananDE

Hi everyone, I am a student,quite new to C++. I am working on my thesis right now. Here is my situation, I have an algorithm for my thesis topic and I tried making an example of this in C++ and it works fine with a console application. But I am …

Member Avatar for ananDE
0
227
Member Avatar for schutzk21

So I need to write a program where the user tries to guess a magic number. The only thing that I do not know how to do is set the max. amount of guesses to 5. This is what I have so far. Can someone please show me how to …

Member Avatar for np complete
0
414
Member Avatar for shabaaz

I need help to write this program. I dont understand how to do a+bi. Please Help Thank You.

Member Avatar for np complete
0
152
Member Avatar for bdl365

So i'm having troubles writing the codes for the following exercise - Write a C++ program that does the following. 1. Asks the user to enter some positive integers. 2. Reads the positive integers from the user. 3. Stops reading the positive integers once a non-positive integer is entered. 4. …

Member Avatar for bdl365
0
2K
Member Avatar for zvjezdan.veselinovic

Hi everyone! I wanted to ask you guys a question. I was referred to this website by a friend of mine and I synced this account with my Facebook. I am new to computer programming, but I understand the beginning basics of C++ (i.e. cin, cout, void, float, vector, functions, …

Member Avatar for zvjezdan.veselinovic
0
211
Member Avatar for Peppercat101

So Ive googled this error but I cant find an explanation of why this is happening in my code.. Error: g++ -o code code.cpp code.cpp:8:17: error: too many decimal points in number code.cpp:8:43: error: too many decimal points in number code.cpp:1:1: error: expected unqualified-id before '<' token make: *** [code] …

Member Avatar for MandrewP
0
2K
Member Avatar for dmose13

So I'm just getting started in C++ and need some help. I want to right a program that inputs a number as n and then outputs digits 0-9 based on n. Also each row adds one more number until the last number is the number of digits of n. For …

Member Avatar for dmose13
0
137
Member Avatar for kinge504

I asked my professor for help and we came to the conclusion to add void credit and void debit yet im still having compiling error. //Account.h #ifndef ACCOUNT_H #define ACCOUNT_H class Account { public: Account( double ); // constructor initializes balance /* Write a function prototype for virtual function credit …

Member Avatar for NathanOliver
0
602
Member Avatar for Bumpehh

this is a very simple RPS game and i ran into a prob. heres the code #include <iostream> // for cout/cin #include <cstdlib> // for rand/srand #include <ctime> // for time #include <cctype> // for case conversion using namespace std; char rps; char ai; char redo = 'Y'; // all …

Member Avatar for WaltP
0
120
Member Avatar for on93

Write a simple program to prompt the user to key in x and n value to calculate the result for the following formula: Result = 1+2!/((x-2))-3!/((x-3))+4!/((x-4) )- … n!/((x-n)) ------------------------------------------------------------------------------------------------------------- Note: x value must be greater than n value. i need help for C++ programming class work thanks a lot

Member Avatar for np complete
0
162
Member Avatar for Labdabeta

Hello, I was wondering how to make the windows explorer popups that many programs use. I want the one that browses files to either open or save a file rather than requiring the user to blindly type the filename.

Member Avatar for Ancient Dragon
0
254
Member Avatar for orar

#include<iostream> using namespace std; float input() { float inches; float feet; cin>>inches; cin>>feet; }; float calculate(float inches, float feet) { float cm; float meters; cm=2.54*inches; meters=feet*.3048; }; float output(float meters,float cm) { cout<<"The feet to meters="<<meters<<endl; cout<<"The inches to cm="<<cm<<endl; }; void main() { float input(); float calulate(); float output(); …

Member Avatar for np complete
0
205
Member Avatar for Vasthor

[Pictures](http://s10.postimage.org/v28zknfu1/Untitled5.png) I googled and found the solution [Solution](http://stackoverflow.com/questions/4702732/the-program-cant-start-because-libgcc-s-dw2-1-dll-is-missing) but I'm nub sooo, what is compiler flag? how to set it up? there multiple choice, so where should I start? Or should I just switch to IDE(Code::Blocks), the C++ Primer recommend me to use command-line interface compiler and compile it 'manually'. …

Member Avatar for deceptikon
0
185
Member Avatar for sss93

I have a class orders which has its instanced stored in a QMap/Map and has a Key:int, value:order pattern. Everything went fine until I started iterating through the map and accessing the functions of the class.First I was trying to print out the order objects values using it's getter methods …

0
120
Member Avatar for Koji01

i want to know how to read all the message inside the file including their spacing,indents if possible using File Handling... can that be done? content of data1.txt: First Name: (TAB)John Doe Last name:(TAB) Manly Height:(TAB) 5'7 Weight:(TAB)164 kls Address:(TAB)Somewhere but here, (TAB)but not to far City. here is my …

Member Avatar for Koji01
0
235
Member Avatar for ShEeRMiLiTaNt

Hello, I need to write a program that takes a string and reverses it via pointers. I have a function called Reverse and what it does is take to pointers (*front and rear*) and intializes them to the front and back of the char array respectively. Then what it does …

Member Avatar for ShEeRMiLiTaNt
0
198
Member Avatar for Nabiha Raza

Here is my complete code. I have really tried everything but couldn't understand where i am going wrong. There is NO ERROR in compilation but the output does take in the elements and output is not being generated. My compiler is Borland 5.2 #include <iostream> #include <conio> class ListStack { …

Member Avatar for rubberman
0
238
Member Avatar for arjuna_wahid

Hello there, I am new to C++. I have a task from school to make simple sorting program using Insertion Sort with a linked list. I would like to have comment, feedback, and correction of my code below. #include <iostream> using namespace std; struct Sort{ int value; Sort *next; // …

Member Avatar for rubberman
0
1K
Member Avatar for chris.vargas.773

I would like to know if this is a correct way to call and define a function for my program #include <iostream> #include <cmath> using namespace std; int math(double a, double b, double c); int main( ) { int math; char a,b,c; math = a + b + c; return …

Member Avatar for rubberman
0
159
Member Avatar for ilvanhellovan

i need help,, i have a text file like this below Line 1 Line 2 Line 3 my question, how to readfile from that txt line by line using Win32 API and output to console... can anyone help me,, i'm very new in c++ Thanks

Member Avatar for Ancient Dragon
0
215
Member Avatar for chris.vargas.773

so i made this program with a function call and definition and i keep having problems with the call function and i get error C2059: syntax error : 'return' when i build my program. #include <iostream> #include <cmath> #include <iomanip> using namespace std; int math (double cartons, double totalcost, double …

Member Avatar for chris.vargas.773
0
128
Member Avatar for nathan_drake

Nothing bothers Bob more than when taller people stand up in front and block his view at sporting events. It bothers him so much, that he has developed a measure for the displeasure that a crowd feels because of this phenomenon. Most days, he calls his measure the Index of …

Member Avatar for SoreComet
0
238
Member Avatar for Bumpehh

so i was bored and decided to make a dice simulator, and i ran into a error. heres the code #include <iostream> #include <ctime> #include <cstdlib> using namespace std; int total[12]; int dice1; int dice2; int aitotal[12]; int aidice1; int aidice2; void Roll(){ srand(time(0)); dice1 = 1+ (rand() %6); dice2 …

Member Avatar for Bob
0
159
Member Avatar for addicted
Member Avatar for akashi

Problem Statement - Case Study : Simulation of a Parking System Consider a Parking System with a machine, handling parking process and payment process. This machine has a card slot-in and slot-out, a customer console (keypad and display) for interaction, a cash collector and a cash dispenser. The machine will …

Member Avatar for WaltP
0
326
Member Avatar for Zion_Chibi

I have a few sets of username and password in the file but when I try to login, the program could only read the first set of username and password. The rest will be invalid input eventhough I key in correctly. #ifndef USERLOG_H #define USERLOG_H class UserLog { public: char …

Member Avatar for WaltP
0
473
Member Avatar for vedel.bajic

Hey Guys! I wonder how to put a texture on a specific position in DirectX. for example: I want a function that allows to set a Texture on an 2D Position and set the width and height like this pseudo funktion: x y w h DrawTexture(pDevice, 25, 25, 200, 100); …

Member Avatar for BigInNYC
0
422
Member Avatar for sss93

Ive got a basic Qt console application whcih write and then reads back an xml document.I have compiled and ran this without any compilation errors, however for some reason it keeps returning an error code and then wipes clean the actual xml document ??? Can someone please explain why it …

0
148

The End.