49,766 Topics
![]() | |
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 … | |
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 … | |
Hello all , Is there an algorithm for computing Very large numbers (Max 9^1000000) without BigNum ??? Thanks in advanced. | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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 >> … | |
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 … | |
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 … | |
Are static variables allocated in the heap or on a thread specific stack. Thanks | |
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 … | |
can anyone tell me the source code in the attached file("mtb.dll") | |
[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 … | |
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 … | |
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 … | |
[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 … | |
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, … | |
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 … | |
[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 … | |
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]. | |
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 | |
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."; … | |
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. … | |
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 … | |
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 … |
The End.