49,756 Topics

Member Avatar for
Member Avatar for Afaf

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 ) . …

Member Avatar for iamthwee
0
230
Member Avatar for Glaxxterm

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 …

0
163
Member Avatar for vahidgholami820

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 …

Member Avatar for rubberman
0
509
Member Avatar for anish.prasad.7739

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 …

Member Avatar for rubberman
0
293
Member Avatar for michelemalta

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 …

Member Avatar for StuXYZ
0
376
Member Avatar for dennis.ritchie

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

Member Avatar for Kristian_2
0
227
Member Avatar for ravi_14

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 …

Member Avatar for Ancient Dragon
0
688
Member Avatar for ala_2

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 …

Member Avatar for ala_2
0
792
Member Avatar for Elharts

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 …

Member Avatar for Kristian_2
0
240
Member Avatar for jeevan reddy

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 …

Member Avatar for jeevan reddy
0
1K
Member Avatar for loldafuq

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 …

Member Avatar for loldafuq
0
309
Member Avatar for kal_crazy

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 < …

Member Avatar for Kristian_2
0
214
Member Avatar for begueradj

Hello How can we know which GCC version is compatiable with a given Python version ? Regards

-1
124
Member Avatar for bokizss

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. …

Member Avatar for Bendez Thyna
0
162
Member Avatar for kumarprashant

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 …

Member Avatar for Bendez Thyna
0
297
Member Avatar for infamous1987

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, …

Member Avatar for Kristian_2
0
167
Member Avatar for Praveen_10

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 …

Member Avatar for David W
0
377
Member Avatar for Bendez Thyna

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?

Member Avatar for Bendez Thyna
0
208
Member Avatar for nathan.pavlovsky

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 …

Member Avatar for vmanes
0
283
Member Avatar for ala_2

I am having trouble reading uint ARRAYS properties from WMI objects. I can read and process STRING properties from WMI objects.

Member Avatar for BobS0327
0
503
Member Avatar for Suzie999

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 …

Member Avatar for Suzie999
0
229
Member Avatar for hahahanz

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 …

Member Avatar for hahahanz
0
247
Member Avatar for dovlet.eminov
Member Avatar for yazan.a.ali.5

1) write a C++ program that reads 50 integer numbers and prints the smallest three numbers.

Member Avatar for Schol-R-LEA
0
115
Member Avatar for Praveen_10

#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: + - …

Member Avatar for Praveen_10
0
272
Member Avatar for thanh.truong.1272

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 …

Member Avatar for uonsin
0
560
Member Avatar for jhender4880

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? …

Member Avatar for jhender4880
0
219
Member Avatar for Siberian

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 ! :)

Member Avatar for Siberian
0
323
Member Avatar for pooja_4

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 …

Member Avatar for Faizal Shariff
1
293
Member Avatar for memo_1

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. …

Member Avatar for Schol-R-LEA
0
98

The End.