49,760 Topics
| |
Operator Overloading for Polynomial Class - Your goal is to overload the operators for a generic Polynomial class. A polynomial will be represented via its coefficients. Here is a degree of third degree polynomial 4x3+ 3x + 2; here will be four coefficients and the coefficient corresponding to 2nd power … | |
Hello. I'm stuck with my Yahtzee project. The first five lines are filled with a brief explanation of the case. Please read them /* I'm writing Yahtzee in C++. So far so good, but I'm stuck now on the recognition of staights and full houses. It's about the lines 131 … | |
I just wrote a simple C++ program. But now I want to share it with a friend and GMail doesn't allow me to use it and putting it on a web domain doens't work either. How do you share a simple program (compiled)? | |
#include <iostream> #include <ctime> #include <cstdlib> using namespace std; int main() { srand(time(NULL)); int tries = 0; int iNum; int UpperLim = 100; int LowerLim = 10; int iCompNum; cout << "Enter a number: "; cin >> iNum; do { iCompNum = rand() % (UpperLim - LowerLim) + LowerLim; cout … | |
While compiling my Yahtzee project I get these errors: ||=== Build: Debug in Yahtzee (compiler: GNU GCC Compiler) ===| ld.exe||cannot open output file bin\Debug\Yahtzee.exe Permission denied| ||error: ld returned 1 exit status| ||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===| I use CodeBlocks. It's not nice … | |
A school wants to be able to check how students have performed in any course. To do this they will use sampling. They will pick the marks of any 5 students and then get the average grade. Each course must have a mid-semester exam mark, a final exam mark, and … | |
Hi,i have this code that i need to turn in for my homework. I based it off some things i saw on the internet. The point of the homework is that i need to have 2 or more structures and use some functions. It would mean a lot if someone … | |
these are the goals of the assignment i am trying to complete, i am running into a problem where i need to create a function get the product the customer selected and reutrn that information in a cout that also inculdes information from another function, i got the first part … | |
I am new to C++ as i have just started programming classes, my background is in networking and hardware, so this is a completely new topic for me. I am having trouble with the creative side of writing code, as i understand the concepts and information just fine. this fourm … | |
**Any help appreciated** The school wants to be able to check how students have performed in any course. To do this they will use sampling. They will pick the marks of any 5 students and then get the average grade. Each course must have a mid-semester exam mark, a final … | |
Hello! Can someone help me with coding in R ? I am new to R and I need to solve this project. It has been so many days I dont find a solution. This is the problem : You are an online movie and concert ticket service. Visitors go to … | |
#include<iostream> using namespace std; int main() int number; int counter=1; int fact=1; cout<<"enter number \n"; cin>>number; while(counter<=number) fact*=counter; counter++; cout<<fact<<endl; how to ask user to repeat | |
Hello, While trying to get back into programming, I come across problems. The first one is: Why can't I work with global variables? Is there a new way of doing the same thing? Thanks | |
so im trying to use the getline function on c++ withe codeblocks app but anytime i use the function which has the format *getline(iostream,variable);* it keeps ignoring the first letter or word before the space for eg in this sample cout<< "enter your full name"<<endl; //user : samuel forson cin>> … | |
Hello,i learned how to used the C++ but i have problems to analysis the problem in my project. Write a program to process monthly paycheck for all contract workers of an organization. Each worker will have the following information: Identification number (at-digit integer), the worker's name, hourly pay rate, and … | |
Hi, I want to sort an array of struct 'Workshops' in accordance with its member variable 'start_time'. I thought of using std::sort for the array and supplying 'CompareWorkshops' function as the third parameter- bool CompareWorkshops(Workshops W1, Workshops W2) { return (W1.start_time <= W2.start_time); } //calculate max no. of non-overlapping workshopes … | |
1. The Broken Arrow cellular company has hired you to write a billing program for data usage on their new 4-tier 5G network. The rate schedule, including discounts for certain customers, is below. Base rate is $12.00 and includes up to 1 gigabyte of data. Anything over 1 gigabyte is … | |
hello everyone, I would like to ask for some help with my assignement. My task is to make a program which is converting arabic numbers to roman numerals, but I can't use loops. | |
Hey? Can someone help me to this program? I need to Search an specific information of a student. #include<iostream> #include<fstream> #include<istream> #include<stdlib.h> #include<string> using namespace std; void login(),registr(),form(),Add(),ShowList(),Search(),Update(); struct Student { int id; char name[25]; char name1[25]; char address[25]; char city[25]; int age; char gender[5]; string email; string contact; char … | |
Hello, Can someone help me for my program? I need to search a specific data of the student. | |
alright so i have got a c++ code(AIRLINE RESERVATION SYSTEM) which i can run as console application, but i want to convert it into GUI, and i dont know anything about GUI, where and how should i begin, i have 1 and half month to present it. | |
I have a program that i need to convert from java to c++... i just need help doing it... heres the java: [code] /* Name: Joseph Coleman Class:CSCI 1302 Assignment: Employee + ProductionWorker Academic Honesty: The integrity of students and their written and oral work is a critical component of … | |
How should i give space between my output numbers while i am storing them in an array ?Like if i ask user to enter numbers and one entered 12345 ,i want to display them as 1 2 3 4 5 | |
Okay I was trying to get my Dynamic Array to resize when I append but it just seems to break and never increase the capacity that it can store. Anyone able to figure out where my problem is? #include "DynamicArray.h" #include <cstring> #include <iostream> DynamicArray::DynamicArray() : m_length(0), m_capacity(0), m_scaling_factor(2.0), m_data(nullptr) … | |
> "(https://answers.microsoft.com/en-us/windows/forum/windows_10-files/what-is-the-correctrequired-headers-to-have-for-c/3ba26bbd-5401-4a80-b3e4-0426512c2730?messageId=504b2171-4fe4-4203-aba3-fb84f607d805") | |
As I'm getting to know about inheritance in C++, one thing that has stuck in my mind is using **public** keyword before **class_name** as in- class Derived: public Base {} What I wonder is that why do we need to make a class **public** that's already outside the *main* function? … | |
I have a fully functional code that uses the random number generator to generate a set of random numbers. I'm trying to display "e" next to all the even numbers in the set, and then have a cout statement that tells the user how many even numbers there are in … | |
Here's a c++ library snippet that could be useful for string formatting (sorry, can't find how to add code tags): #ifndef STRINGFORMAT_H #define STRINGFORMAT_H const char newln { '\n' }; const char tab { '\t' }; const char bs { '\b' }; const char apo { ''' }; const char … | |
New to asking help but I'm desperate. I have most of the code I just need advice and also how to put the value from the file into the array and then pass to the functions without using any strings or string header. Basically trying to make this work and … |
The End.