49,761 Topics

Member Avatar for
Member Avatar for SW-ENG mohamed

Given an integer n, print the following shapes using asterisks and spaces. For example, for n = 5 the following shapes are printed Input: 5 Output: * * * * * * * * * * * * * * *

Member Avatar for Kristian_2
0
166
Member Avatar for Labdabeta

Hello, I was recently looking through some of my code and found what I believe to be a memory leak. It is in a function that appends two strings and I am not sure how to resolve it. Here is the function: const char *strapp(const char *str,const char *s) { …

Member Avatar for mike_2000_17
0
523
Member Avatar for Complete_1

I can't work around these errors. Can someone help me out? Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 3 error C2238: unexpected token(s) preceding ';' Error 1 error C2143: syntax error : missing ';' before '<' Code: #pragma once #ifndef …

Member Avatar for Ancient Dragon
0
637
Member Avatar for ziggystarman

Hi I've written this small program to demonstrate the Diffie–Hellman key exchange algorithm. The desired output from the program is for most runs correct. However occasionally there are some discrepancies in output of the shared secret keys values in that they don't match, when they should. I've found that certain …

Member Avatar for logicslab
0
989
Member Avatar for vinay L
Member Avatar for endri_1

Hi, i have a home work to do and is about Array-based Lists and Array-based Queues but i have no idea what goes on with my class since they have put me a higher level that i was supposed to be. Does anyone know any sites to send the hw …

Member Avatar for David W
0
330
Member Avatar for 111100/11000

/* Made in code::blocks 12.11 -randomly generated terrain mirrored to be equal for bought players - - */ #include <iostream> #include <windows.h> #include <stdio.h> #include <string.h> #include <ctype.h> #include <fstream> #include <cstring> #include <string> #include <cstdlib> #include <ctime> #include <sstream> #include <cctype> using namespace std; //Public functions char printMap(char terraniValue); …

Member Avatar for 111100/11000
0
1K
Member Avatar for daniel1977

Here are 6 files I've been beating my head against the floor for about 20 hours now. I know I am sooooo close, but I just can't seem to find much information about overloading operators in a derived class to perform arithmetic operations on objects created in the base class. …

Member Avatar for Moschops
0
295
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
231
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
164
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
512
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
384
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
228
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
796
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
242
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
125
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
163
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
378
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
216
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
335
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
506
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
230
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

The End.