51,592 Topics
![]() | |
Hi, I am getting erros in coverting the following C++ code to C language. Also what is the alternative of #include<bits/stdc++.h> library in C language? // C++ Implementation to find the // XOR of the two Binary Strings #include<bits/stdc++.h> using namespace std; // Function to find the // XOR of … | |
hello guys I'm trying to make a code that return the name of the flight that has the most total number of passengers from a file : Alitalia Rome 180 Alitalia Pisa 82 Germanwings Munich 96 Germanwings Frankfurt 163 NorwegianAir Bergen 202 Wizzair London 184 Wizzair Frankfurt 83 Wizzair Lisbon … | |
Sorry if there is bad formatting, but this is my first post. I am trying to use a copy constructor to copy the list in LinkedList and then show that they are the same in the copy using the display() function. My problem is that when I try to populate … | |
There are times when you need to make sure your counter starts at an odd or even number. Even is pretty simple - `counter = counter + modulus(counter)`. If counter is even it stays, if it's odd it gets incremented by 1. Odd is a bit more complicated - `counter … | |
Hello guys, I am currently working on an insurance management system and i need help on how to use files and on how to create an admin side since I am new to this. Thank you | |
i am unable to do c++ turtle programmingin in my netbeans ide how can i configure it to do so.please help or tell any other methods for this | |
 | |
My name is Henry, and I started programming about 10 years ago. I always loved playing video games, even from a young age. That passion eventually turned into something much more. Learning programming languages is very popular at the moment. A lot of people leave their current workplaces to learn … | |
Hi all I need assistance with the below code snippit. It calculates how many of salaries entered exceeds R100 000 or how many is below. With the below entries the lower count totals to 4 instead of 5. What am I doing wrong? Still new to this so please excude … | |
hi guys i am a new of programming and new of c# i try to learn it , i try to understund how work a listview , i have a file.txt inside of this , i have 4 line . i have creted a form with a listview with 2 … | |
Hello, I am writing this code to allow for a menu based banking system application. Part of the assignment was to check for input validation of the file I would like to open. In this case the user inputs their "customer id" which is stored as "custid" and then this … | |
Hi all I need assistance with the below code snippit. It calculates how many of salaries entered exceeds R100 000 or how many is below. With the below entries the lower count totals to 4 instead of 3. What am I doing wrong? Still new to this so please excude … | |
Print a full line of C++ string array, if use gives the 1st name. Example: string X[10]={"Muhamad Husin, A123456", "Nor Asma, A155743", "Raja Kumar, A18723", "Muhamad Ali, A123908", "Ali Shah, A145234", "Siti Sarah, A120945", "Siti kahadijah, A154237", "Syed Azman, A276456", "Chong Wei, A156278"}; User will input "Nor"; Print the full … | |
I have a funny feeling this is a stupid question so bear with me. I'm passing a string array to a function to search for elements in it. I have what is written below, and all it does is print "Not Found" five times. I'd also like it to print … | |
Apostle “Kojo Safo” popularly known as “KANTANKA (KTA)” is one of the renowned entrepreneurs in Ghana. He manufactures cars, agriculture light and heavy duty machinery just to mention a few. His products have attracted many investors both local and foreign. However, sales of his manufactured cars in particular, have seen … | |
I am doing this program for a cs class. I am trying to create menu based system that will allow the user to input the number that corresponds to the option they want to choose. Then based on that option they will input their customer id (this is a banking … | |
1. Write a program with one user-defined function to convert weight from pound to kg. 2. By using three user-defined functions, you are asked to write a program to calculate the area of a circle. Function input – ask user to input the radius Function calculate_area – calculate the area … | |
I'm busy writing Yahtzee. Now, I want to fill a const char[] with the field names: 1's, 2's, 3's, ..., "Full House" "Small Straight" etc. But I get this errors #include <iostream> #include <stdlib.h> using namespace std; /* 1 2 3 4 5 6 3 of a kind carre full … | |
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 … | |
I am now learning OpenTK. I have some trouble learning how buffers, vectors and how to make more than 2 3d shapes. and if I try to set the texture or shaders, it will change all the shapes to the same textures and shaders. I have read a lot of … | |
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 … | |
Hi. I just installed Code Blocks. I want to just get started with programming. It seems that I have to configure Code Blocks therefore, setting up a compiler. How should this be done? Help Leon |
The End.