49,756 Topics
![]() | |
Creat a text file that contains student number ( 9-digit number ) , year ( one of the four years: Senior denoted by SE, Junior denoted by JU, Sophomore denoted by SO or Freshman denoted by FR ) and GPA ( a floating point number greater than 0.0 ) . … ![]() | |
Hi)I've been using Codeblocks for a long time;since I configured the Toolchain executables shortly after installing I had no problems with compiler;but now when I try to compile a program, codeblocks responds with a statements about wrong compiler path;when I try to run a program it responds with "Target uses … | |
i want to write a c++ code that due the structure of file space allocation,Simulates file system with 2*n array.Each column represents a sector,The first row is for storing files And second row holds the address of the next sector (Number of columns).and With each click on keyboard Create a … | |
This program is for a car rental agency. Your program will have to compute the total cost of a rental. This agency has two types of cars, and the rates per day are as follows: All cars come with a basic insurance that covers damage to third Driver above 25 … | |
Hi, this program is a high-low guessing game that generates a random number and the user has 6 guesses to win their bet. When I run my code the "random number" is always the same. Any help is greatly appreciated. #include <iostream> #include <iomanip> #include <ctime> /* to access the … | |
This seemingly small code which swapps 2 numbers is giving me a headache..help!! C++ + am wondering why would one need to swapp the numbers in real life? trickery? magic | |
i made a project using visual studio and opencv ,it worked fine. however later i thought of adding GUI. i googled and found abput QT.some how i managed to include libraries and build paths,when i use **C fucntions of opencv** the program works fine but when i use ***c++ features … | |
i am trying to vendor specifc attribute from this WMI class MSStorageDriver_FailurePredictData(HDD SMART information). Here is the used code : IEnumWbemClassObject* pEnumerator = NULL; hres = pSvc->ExecQuery( L"WQL", L"SELECT * FROM MSStorageDriver_FailurePredictData", WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &pEnumerator); IWbemClassObject *pclsObj = NULL; ULONG uReturn = 0; while (pEnumerator) { HRESULT hr … | |
Hello, I am currently writing a program that estimates Pi values using three different formulas pictured here: http://i.imgur.com/LkSdzXm.png . This is my program so far: #include<iostream> #include<cmath> #include<iomanip> using namespace std; int main() { double leibniz = 0.0; // pi value calculated from Leibniz double counter = 0.0; // starting … | |
I want this structure variable as well as all the structure elements to be used in multiple source(.cpp) files. I did like this and getting did like this and getting following errors. I am using vs2010. Please help me i am a newbie. Error 2 error LNK2001: unresolved external symbol … | |
I'm beginner with c++ and want some help Create Class CSalary with private member variables string m_strProfession double m_dSalary Constructors:Default,Copy,Explicit Functions: 1/string GetProf(void),double GetSalary(void) 2/SetProf(const string val),SetSalary(const double val) 3/Output(ostream&) and Input(istram&) 4/Operators:<<,>>,=,==,<,double operator*(const CSalary&obj) Create Class CCalcCorr with private member variables: vector<CSalary>m_vCity1//data for city 1 vector<CSalary>m_vCity2//data for city 2 … | |
The aim is to create a gdb function that changes current path to the upper level i.e `C:\Windows` to `C:\` I tried to strip away characters while the buffer array != '' Here is what I tried: void gdbCommand(){ char buffer[MAXCHAR]; strncpy(buffer,path,sizeof(buffer)); char result[MAXCHAR]; for(int i = 0; i < … | |
![]() | Hello How can we know which GCC version is compatiable with a given Python version ? Regards |
Write a C++ application that asks the user to enter 10 numbers. The program then stores those numbers in an Array. The program should display the Mean , Median, and Mode. Mean is the average of the 10 numbers. Median is the average of the 5th and the 6th numbers. … | |
hi I have a project due this Monday to make an address book. need some help with that.I have some code with me but it is not working. please help me if you can. i have attached a copy of the same and given description below. program description: develop a … | |
using namespace std; int numCheck(int x); int main () { const double LAWYER = 0.10, PERSONAL_ASSISTANT = 0.03, AGENT = 0.07, TRAINER = 0.05; double athleteBeginSalary(0.0), lawyerSalary(0.0), personalAssistantSalary(0.0), agentSalary(0.0), trainerSalary(0.0), professionalTotalSalary(0.0), athleteEndSalary(0.0); int numLawyer, numPersonalAssistant, numAgent, numTrainer, x(1), y(0); string firstName[8], lastName[8]; // The number of the Professional hired: Lawyer, … | |
after the 1st iteration the toss is 100 and then the iteration increases toss to 200 and then 300. Why is this happening i want toss to be made only hundred times. PLease help me. #include <iostream> using namespace std; #include <cstdlib> #include<ctime> int toss(void); int main(void) { srand(time(0)); int … | |
i have this for my requirement assignment: Write a search function int get_index(const float astm[?][?], const int size) to find the array index from a given size. can someone give me some hint on how to di it pleass? | |
Hello programmers! I was working on a program that reads a sequential file with bank accounts. The file has three sets of data per line: the account #, the account holder's name, and balance. Then, I made a program to print the file- and it printed the last line of … | |
I am having trouble reading uint ARRAYS properties from WMI objects. I can read and process STRING properties from WMI objects. | |
Simplified code snippet produces assertion string out of bounds error if I do not uncomment the if statement in main. using namespace std; size_t find_next_of(string & src, size_t pos) { //size_t tmppos; //if (pos != string::npos) { return src.find_first_of('a', pos); //} //return string::npos; } int main( void ) { string … | |
Hello Im quite Confused right now. I am trying to insert a Node in between nodes and it is not being displayed. Please Help. #include <iostream> #include <conio.h> #include <cctype> using namespace std; struct Node { int DATA; Node * Next; }; Node * head = NULL; void Display(); void … | |
| |
1) write a C++ program that reads 50 integer numbers and prints the smallest three numbers. | |
#include <iostream> #include <cstdlib> using namespace std; // function prototype for add int add (int x, int y); int sub (int q, int r); int mul (int s, int t); int divi (int u, int v); int main () { int a,b; char ch; loop:cout<<"ENTER CHOICE OF OPERATION: + - … | |
I was asked to create a program to find word frequencies, word length in a text file. I am able to use map to do the frequencies part but don't know how to sort the the output accordingly to the length of the words. The example output that I should … | |
I have to take a 5 element array and use a function with pointers to make a new array that is one element bigger and shifted 1 place. I have it working so that it shifts one place but the function isn't making the array one element bigger. Any sugestions? … | |
Hi, I didn't know where to place this thread :) Any recommendations for an IDE app to save snippets of code within the program, I looked online, and there are many options, too hard to pick ! :) | |
hey can any one try out this problem.... 1)Write a program to read a sequence of N integers and print the number that appears the maximum number of times in the sequence. INPUT Input contains two lines. First line in the input indicates N, the number of integers in the … | |
Write a C++ program to perform the following: 1) Input a positive integer total that represents the total distance in meters a person needs to travel. 2) Input a positive integer first that represents the distance of the first jump. This distance should be less than or equal to total/20. … |
The End.