48,986 Topics
| |
1,hi i need to create a program that will repeat the following 14 times.it needs to provide keyboard input that takes in hours worked in a day.after the 14 time it needs to show the hours worked. 2,the rate of pay is 6 pounds 50 pence. it needs to provide … | |
please tell me algorithm or code for following character sorting (Ascending) problem. For example Text file contains following data: 001, PSTR, abcdef, h.no.222 abcdefghik lmnopq rstuv, student, A-level 002, MKTO, abcdef, house. 2 abcdefghik lmnopq rstuv, student, rtv 003, LORR, abcdef, h.number.210 abcdefghik lmnopq rstuv, student, O-level 005, ASMP, abcdef, … | |
I thought I had this program licked and moved on to fixing the next problems, then ran it again and found out my while loop isn't doing anything. It goes into my loop, stops, and doesn't do anything else. If there was one item, it should move on to the … | |
i am writing a binary to decmal conversion program in c++ and am so lost just wondering if anyone out there could lend a hand to a lost soul also am curious as to how decimal to hexidecimal would work too just wanting to learn more about programming language and … | |
i have a machine problem to do. it should compute for the average grade of N scholars. N will be entered on the keyboard and the Student No. and Grades of the Scholars in *8 Subjects will be entered. sample output of program should be like this. STUDENT NO. S1 … | |
When using visual c++ does code that would work in other programs work as well? | |
Hi guys. I will explain the problem I have in my own words. I have to make a program using the Fibonacci numbers, in which the user inputs a number of days and the original size a green crud population, and every 5 days the population changes by fibonacci numbers. … | |
Say you have a class called example: [CODE]class example { int one; int two; };[/CODE] and you use this to get numbers from the user: [CODE]example number; cout<<"enter numbers"<<endl; cin>>number.one>>number.two;[/CODE] and then you call one function to manipulate the numbers and another to do some more manipulation. How do you … | |
Hello, I'm trying to simply copy the text from one .txt and create a new one and copying it to a new txt. I'm actually adding more text to that new file but that's not the part I'm having problems with. I could go through the entire .txt with this … | |
Hi everyone, I have a problem with debugging a dll file. I'm trying to convert the epanet2.dll (EPANET: a free source-coded water resource program) into a 64-bit dll file for my project. When compiling, errors coding LNK2001 and LNK2019 occurred many times. error LNK2001: unresolved external symbol ... error LNK2001: … | |
Hi guys... I'm a student having a bit of trouble with my assignment. The assignment is to make a program for a phone company to calculate call durations, costs, discounts etc... I need the user to input call start time in 24 hour style... and end time. In order to … | |
[code=cplusplus] // file celsius to F // calculate from c to f in the depth st #include <iostream> using namespace std; float celsiusAtDepth (float); float CtoF (float); int main () { float depth; float tempF, tempC; // get depth cout<< " Enter depth in Km " ; cin>> depth; //calculate … | |
Hi All, I'm currently working on my project (which try to perform degree reduction for a Bezier curve). I've spent a long time trying to find library or useful class to help me perform matrix inversion. For example degree reduction in Bezier's curve (let's say from degree 3 to degree … | |
I need help deleting from a vector. My program is about the josephus problem. It has to delete soldiers. It does deletes the first one but then it stops. Thank you! | |
This is my program: There is a secret government organization called PIB which only accepts recruits who fit their criteria (shown below). If you fit any of the combinations of criteria, then you can apply to work for PIB. Write a program which asks the user appropriate questions (ask all … | |
I have this project where I have push characters onto a stack from phrase until either one of the characters in encrypt1 is encountered that's also in the the phase. Then, it is supposed to stop and pop and print off the characters in the stack until it gets to … | |
Ive began a book to learn c++ and in the first chapter I ran across my first question(thats never good...). In the book it says I should use this same template in every single c++ program I EVER make. The template is [CODE] #include <cstdio> #include <cstdlib> #include <iostream> using … | |
The requirements are actually simple, just asking to sort a few, say 10, 20 or so, intergers in ascending order. However, array and pointers are not allowed to be used, and just the fundamental knowledge about flow control are permitted. The hints are as follows: 1. Initialize a variable F … | |
hello, i got a error, declaration of string shadows a parameter...mind help me with it [CODE]#include <fstream> #include <string> using namespace std; int numToRom(string&,string&,string&); int main() { string data; string result; string romNum; cout<<"Please enter a number"<<endl; cin >> data; numToRom(data, result, romNum); cout<<"Output : "<<result<<endl; } int numToRom(string& data, … | |
Hey guys, I'm new to C++ and in desperate need of help. I'm trying to write a program that is like powerball. I need to generate six random numbers. The first five numbers need to be in the range of 1-55 while the sixth number is in the range of … | |
Hi all, Ok, I've just been trying to write a program that will convert MPH (miles per hour) into the number of minutes and seconds it takes that person to run one mile. This is what I have: [code=cplusplus] #include <iostream> using namespace std; int main() { double mph, count … | |
I am trying to do the [B]bubble sort[/B] to make my numbers in the array go from smallest to highest. Afterwards, I want to use the [B]SeqOrderedSearch[/B] to find the location of the number in the array. If the number is not found, i will have to state it is … | |
so i have spent 3 hours trying to figure out how exponents work in C++ but now. my if statement isnt working. even if i punch in a 0 it spits out 1 thanks in advance [CODE]#include<iostream> #include<string> #include<cmath> using namespace std; void binToDec(string getBinary); void main() { string getBinary; … | |
The following program should take 4 numbers but it takes 5 numbers and prints first 4 number entered. How to correct the problem??? [ICODE]#include<stdio.h> #include<conio.h> void main() { int a1,a2,a3,a4; printf("Enter 4 numbers \n"); scanf_s("%d %d %d %d ", &a1,&a2, &a3, &a4); printf("The 4 numbers entered are %d %d %d … | |
I'm new to C++ and I wondering what is the best program to use to type code into? I use vista so if a c++ program requires some extra work to make it work can you tell how to make work as well? Thanks for reading! | |
Hey everyone, I typically don't like to go on forums and throw my code at people and expect answers... but, I'm a beginner (and a little desperate) with all this so a little help would be much appreciated. Here's the details: [LIST] [*]The purpose of the program is to have … | |
I want to do somthing like this. [code=C++] ifstream My_File::GetFile_Stream() const { return(this->Input_Stream); } [/code] where Input_Stream is a private member of the class My_File and is declared as follows: ifstream Input_Stream; When I compile I get the following errors: /usr/include/c++/3.3.1/bits/ios_base.h: In copy constructor ` std::basic_ios<char, std::char_traits<char> >::basic_ios(const std::basic_ios<char, std::char_traits<char> … | |
I am a new user and I am looking for some help with one of my problem. I have to write a program that reads in from a file through structs and store the information in a single struct and write the code to display a single class. This needs … | |
I'm having trouble with this section my code and am hoping that you can help me diagnose and solve the problem. I'm not sure if it makes a difference, but I compile and run my code in Cygwin. The problem: At run time when the program asks for the user … | |
Hello everyone! This is my first posting :). I am having a segmentation fault with my program. It compiles fine. When I run the debugger, my program immediately crashes. Could someone look at my code and help me where I went wrong? |
The End.