49,766 Topics

Member Avatar for
Member Avatar for doublecheck

Hello all, I'm new to programming and I came across the practice problems thread and tried one of the beginner ones: "Make a program that allows the user to input either the radius, diameter, or area of the circle. The program should then calculate the other 2 based on the …

Member Avatar for doublecheck
0
157
Member Avatar for enkidu75

I am trying to make a program for class which is circular so it can be used until the user is done. the idea is choose an option then it calls the function, but for some reason it calls the estimate screen even when main_input does not equal 2. I …

Member Avatar for peter_budo
0
107
Member Avatar for medopunsher

Hello all , Is there an algorithm for computing Very large numbers (Max 9^1000000) without BigNum ??? Thanks in advanced.

Member Avatar for arkoenig
0
107
Member Avatar for biancaW

could you write a program that process the weekly payroll of the Brooks Leather Company (BLC). For each employee of BLC the program will compute the gross pay, deductions, and net pay. Each week BLC enters the following information into a data file called 'paydata' for all the employees: Social …

Member Avatar for arkoenig
-3
100
Member Avatar for andimiami

Hello! I need a little more help. I have managed to convert all my chars input from a text file into digits. Example: Input from file: $1,9,56#%34,9 !4.23#$4,983 Output: 1956 349 423 4983 Now, I need to take those individual digits the 1 9 5 6 and make it read …

Member Avatar for mrnutty
0
207
Member Avatar for Swiftle

Hi, I'm doing a client/server with threads instead of forks. The goal is to have multiple clients connect to the server and for each client the server makes a new thread. Although it's working atm, there are things that bother me, especially the sockets. The first thing I want to …

0
56
Member Avatar for <Tech>

Hey, I'm going to college to major in computer programming. Will what I learn in college, in any way, help me to write my own programming language and make my own compiler? If not, where could I acquire the information?

Member Avatar for gerard4143
0
82
Member Avatar for plang007

Here is my code: #include <fstream> #include <iomanip> #include <cmath> using namespace std; int main() { char fare; char choice='Y'; int hrIn, minIn, hrOut, minOut; int hours; int minutes; int total_minutes; double cost; float charge; float additionalTime; while(choice=='Y'||choice=='y') { cout << "\nThis program will calculate a single, couple, or group …

Member Avatar for Software guy
0
191
Member Avatar for jember

I need immediate help here. Please help me! :) I just can't figure out why my program is crashing while executing it. The compiling of the program is fine. (no syntax errors) I used Dev C++ 4.9 for this version. [QUOTE][CODE] #include <iostream> #include <conio.h> #include <iomanip> #include <string> using …

Member Avatar for jember
0
157
Member Avatar for lexusdominus

i would never ask for debugging help usually but i am totally lost and have wasted far too much time on this. both peices of code compile correctly. the original function works fine with my program and the second one crashes. the original code checks a textfile in the root …

Member Avatar for lexusdominus
0
318
Member Avatar for fpsasm

Hello, I am writing a section of c++. Here is the section that does not work: [code=c] int a, escape; double temp1,temp2; escape = 0; a = 0; while(escape < 2){ Complex c[a]; cout << "Please input a complex number, the real part follwed by the imaginary part.\n"; if(!(cin >> …

Member Avatar for fpsasm
0
113
Member Avatar for blee93

Hi, I wrote this code for C++ Primer Plus, but I don't really get why it doesn't work. [CODE]#include <iostream> #include <cctype> using namespace std; int main() { char ch; string str; int vowels = 0; int consonants = 0; int others = 0; cout << "Enter words (q to …

Member Avatar for Red Goose
0
225
Member Avatar for holocron

Greetings all DaniWeb people, long time no see. I have a (hopefully) easy question. Let's jump into the code. My test harness: [CODE] cout << "--------------------------------------------------------" << endl; cout << "Begin Copy Constructor Testing" << endl; cout << "--------------------------------------------------------" << endl << endl; dlSL = new DLSortedList(); for (int i …

Member Avatar for holocron
0
241
Member Avatar for LevyDee

Are static variables allocated in the heap or on a thread specific stack. Thanks

Member Avatar for LevyDee
0
78
Member Avatar for dimProg

Hello, I'm new to c++ and we're just starting classes and objects in class. I've done a bit of programming in Java and I'm struggling to initialize an object using a variable. I must be missing something fundamental but I can't for the life of me figure it out. Here's …

Member Avatar for rickster11
0
1K
Member Avatar for Jessurider
Member Avatar for Sundayy

[B]I'm new to C++ and I need help in writing code:[/B] Lucy likes to jog in the morning. As she jogs, she counts the number of strides, she makes during the first minute and then again during the last minute of her jogging. She then averages these two numbers together …

Member Avatar for Sundayy
0
168
Member Avatar for KHALIL ASLAM

QUESTION? (TIME TABLE) YOU ARE THE OWNER OF A RAILWAY SYSTEM BETWEEN n CITIES, NUMBERED BY INTEGERS FROM 1 TO n. EACH TRAIN TRAVELS FROM THE START STATION TO THE END STATION ACCORDING TO A VERY SPECIFIC TIMETABLE (ALWAYS ON TIME), NOT STOPPING ANYWHERE BETWEEN. ON EACH STATION A DEPARTURE …

Member Avatar for jonsca
-2
135
Member Avatar for medopunsher

Hello , The following function takes a number x and returns the sum of all numbers before n. For ex. when x = 5 the function should return 4+3+2+1. [CODE] unsigned long long rep(int x) { if(x==1)return 1; return x + (rep(x-1)%314159); } [/CODE] I'm getting a segmentation fault with …

Member Avatar for medopunsher
0
91
Member Avatar for plang007

[CODE]#include <iostream> #include <fstream> #include <iomanip> #include <cmath> using namespace std; int main() { char fare; char choice='Y'; int hrIn, minIn, hrOut, minOut; int hours; int minutes; int total_minutes; double cost; float charge; while(choice=='Y'||choice=='y') { cout << "\nThis program will calculate a group " << "\nfare amount which is then …

Member Avatar for rxlim
0
152
Member Avatar for water_ox

I need help with this assignment that I have to do. I am new to C++ programming and I do now know how to start this lab. Here is the instruction to the lab..please help.. COMP-122 Lab 6 Grade Arrays Objectives: • Use an organized, modular approach to develop programs, …

Member Avatar for jonsca
0
222
Member Avatar for Dadkhah

Hi. I using this Thread "Serial port communication using C++ = "http://www.daniweb.com/forums/thread56329.html" and I change it for solved the some error in program. This is my source code: serial.h #[CODE]define FC_DTRDSR 0x01 #define FC_RTSCTS 0x02 #define FC_XONXOFF 0x04 #include <stdio.h> #include <time.h> #define VC_EXTRALEAN #include <string.h> #define ASCII_BEL 0x07 #define …

Member Avatar for Dadkhah
0
251
Member Avatar for Kunal Aggarwal

[CODE]void CScreenCoordDlg::OnMouseMove(UINT nFlags, CPoint p) { GetCursorPos(&p); m_ValX = p.x; m_ValY = p.y; UpdateData(FALSE); }[/CODE] I used the following code to get the mouse coordinates on mouse move. But the problem is as soon as the mouse moves out of the dialog window it stops updating the mouse coordinates. Although …

0
108
Member Avatar for Gregor97

I have had no previous programming experience and want to start learning C++. T was hoping if you could reccomend a good book. P.S. I've been thinking about [I]C++ Primer Plus[/I].

Member Avatar for alex55
0
139
Member Avatar for dprakashkumar
Member Avatar for lochnessmonster

im curious as to why when i make a dll win 32 project in visual studio 2010, it doesnt show my dllmain function so i can work off that and leaves me with an blank .cpp.(and no i didnt click empty project). How can i fix this? -thx

Member Avatar for Ancient Dragon
0
42
Member Avatar for jogieglenmait

i have a program that would display the productName,productPrice,productCode. each is a separate array. the program would prompt user to add,delete,or search a productName,productPrice,productCode. here's what i tried to do: [CODE]string productName[100]={"milk","beef"}; int productPrice[100]={10,11}; string productCode[100]={"a1","a2"}; int x,y,z; char choice; string search,name,price,code; cout<<"what do you want to do?"; <<"[S]earch."; <<"[A]dd."; …

Member Avatar for attefeh
0
150
Member Avatar for riotburn

I just got a program that does forward substitution. It is working fine but I would like to make it so the user can enter size of both 2D n x n array and a n x 1 array and then be able to enter the elements of the arrays. …

Member Avatar for attefeh
0
5K
Member Avatar for A C++Programmer

I'm trying to make a program that will scan the screen for a certain color. i tried to use GetPixel(), but it is too slow. someone else recommended i use GetDIBits(). Can anyone explain or give an example source on how to scan the screen for a certain color with …

0
41
Member Avatar for strungoutfan78

Hey everyone. I'm brand new to C++ and programming in general and this is my first post here. I've found lots of good info here and these forums helped me a lot last semester. I've got a problem here though. This is a small bit of code I had to …

Member Avatar for strungoutfan78
0
399

The End.