49,761 Topics

Member Avatar for
Member Avatar for jal pari

Write a program that clear the difference b/w increment & decrement operators using binary & unary operators. can anyone help me out in this program ???

Member Avatar for tinstaafl
0
180
Member Avatar for PulsarScript

Hi all,please help me out,how to find occureces and scale in this situation?And what is wrong with diplay option,once it displays,the numbers are not in the same column. Thank you kindy. #include "stdafx.h" using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int list[12]; cout<<"Enter 12 values:\n"; for(int i =0;i<12;i++) …

Member Avatar for deceptikon
0
136
Member Avatar for skyyadav

Hi When I tried to compile like g++ -std=c++11 -W -Wall it gives this error error: ‘stoi’ is not a member of ‘std’ #include <string> #include <iostream> #include <fstream> class Grade { public: // Default Constructor Grade() {}; // Functors // If the given course and the score matches the …

Member Avatar for Kanoisa
0
1K
Member Avatar for zozzooo

I have an application this is alredy license but in this application use my functionlity put custome .afl file this file make in c++ i make this .afl file as trial period.So how to make this .afl file as 7 day trial period.....so plz help me... If any one can …

0
134
Member Avatar for miekie357

Hello, guys I'm hoping that you can help me. I'm having a problem coding w/ this problem. I find it hard to do this bcoz when I run the program the result always be like this. #include "stdafx.h" #include <string> #include <iostream> using namespace std; int main() { for (int …

Member Avatar for tinstaafl
0
375
Member Avatar for ariel930

Hi.here is a question I got for assignment.I am stuck in this for hours and couldnt com up with any logic.Any help will be highly appreciated.Thanks Depth-First-Search Q.No.1 The undirected unweighted graph with one selected vertex is given. Find the number of vertices in the connected component where the selected …

Member Avatar for mridul.ahuja
0
169
Member Avatar for sarah.mathieson.7

This is the prototype I was provided with for my Person constructor: Person(const char * their_name, const char * email, int day, int month, int year); In making my constructor I have tried to use base member intialization, but I am having issues, this is what my constructor looks like: …

Member Avatar for mike_2000_17
0
262
Member Avatar for toneranger

Hi All, Well I've been stuck for a while here. I'm trying tp write a function called TransfertoSwingID which will transfer a line of data held in a struct contained in a vector to a new vector of structs. Basically as I'm iterating through the vector of structs called "prices", …

Member Avatar for tinstaafl
0
176
Member Avatar for can-mohan

Hi All, I have doubt in my mind regarding declaration of cin and cout object . As per my understanding cin and cout both object are accessible in main then they shouldn't have protected.in below code snippet i have overloaded both input and output operator and while giving new name …

Member Avatar for can-mohan
0
457
Member Avatar for PulsarScript

Hi to all,can anyone tell me please why is the code doesn't behave as it should. It dispalys hours and minutes from 19:00-23:59 ,but not from 00:00-23:59? Here is the code. #include "stdafx.h" using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int hours ,minutes ; for(hours =0; hours<24; hours++) …

Member Avatar for deceptikon
0
94
Member Avatar for H_beginner

#ifndef POINT_H #define POINT_H class Point { public: Point(); Point(int, int); int getx(); int gety(); void setx(int); void sety(int); private: int x,y; }; #endif //POINT.CPP #ifndef POINT_H #define POINT_H class Point { public: Point(); Point(int, int); int getx(); int gety(); void setx(int); void sety(int); private: int x,y; }; #endif #ifndef …

Member Avatar for H_beginner
0
416
Member Avatar for glao

Hello , I am trying to solve some problems from the "Computer Simulation Methods" book. It says > > Write a class that solves the nuclear decay problem.Input the decay constant l from the control window.For l=1 and dt=0.01 ,compute the difference between the analytical result and the result of …

Member Avatar for glao
0
647
Member Avatar for prakhar_1

#include<iostream.h> #include<conio.h> void main() { int a[10],i,item,flag=-1; cout<<"enter the elements of an array"; for(i=0;i<=9;i++) cin>>a[i]; cout<<"enter the element to be search"; cin>>item; for(i=0;i<=9;i++) if(item==a[i]) { flag=1; break; } if(flag==-1) cout<<"search unsucessfull"; else { cout<<"search sucessfull"; } getch(); }

Member Avatar for NathanOliver
0
155
Member Avatar for suhasgh

Evil Nation A is angry and plans to launch N guided-missiles at the peaceful Nation B in an attempt to wipe out all of Nation B’s people. Nation A’s missile i will arrive in nation B at the time ti. Missile i communicates with its headquarters by unique radio signals …

Member Avatar for nerandell
-1
268
Member Avatar for fiffa

Write a C++ program that defines class Student with data members: ID, Name, average and array of 5 integer grades. And member Functions: - A private function computeAverage: to compute student’s average( the data member). - A public function getAverage that returns the value of student’s average - Overload the …

Member Avatar for Ancient Dragon
0
100
Member Avatar for toneranger

Hi, I've got a vector of structs populated with the following fields: double double double double (unsigned int) (unsigned int) string I want to take each line in that vector (call it OldVec), and 1. transfer it to a new vector of structures 2. add a string identifier at the …

Member Avatar for toneranger
0
270
Member Avatar for jvasher

Sometime crashes, sometimes blank text, and sometimes works. I'm passing (I hope) a reference to TextDisplay::update() so It can draw all the text in keyBindMenu which is a vector of std::strings. I'm not sure if I'm handling this correctly. My understanding of this is very weak, but I think I …

Member Avatar for jvasher
0
132
Member Avatar for refphlex

The second loop after opening the file again the second calculation for count isn't coming out correctly it seems to be doubled, comes out double the normal value when it shouldn't someone help please! #include <iostream> #include <iomanip> #include <string> #include <fstream> #include <cmath> using namespace std; int main () …

Member Avatar for refphlex
0
166
Member Avatar for nathan.pavlovsky

Hello programmers! I am working on a Tic-Tac-Toe player vs. computer class, which is supposed to have a `run.()` method in order for the game to start. In a `gameWon()` member function, I am checking for a win, either by the player or by the computer. I check to see …

Member Avatar for Moschops
0
514
Member Avatar for vdhyasri

#include <stdio.h> #define N 40 void sum(int*p, int n, int d[]) { int i; *p = 0; for(i = 0; i < n; ++i) *p = *p + d[i]; } int main() { int i; int accum = 0; int data[N]; for(i = 0; i < N; ++i) data[i] = …

Member Avatar for mike_2000_17
0
174
Member Avatar for roidbeginnerlvl

I am trying to read a textfile containing some informations in this format, itemId:itemDescription:itemCategory:itemSubCategory:amountPerUnit:quantity:date. item.txt 1:macbook:electronics:laptop:100:100:18-Oct-13 2:Iphone 5:electronics:handphone:50:50:18-Oct-13 I am able to extract everything except the itemId. Please advise or suggest what I should change/do to get the id. Thanks in advance. my output Id: <----blank! Item Description: macbook item …

Member Avatar for richieking
0
200
Member Avatar for jvasher

Tried searching for an answer to this, but not sure even how to explain this question so i will show a code example.(I blame java, better then saying i'm brain damaged) I have no problems with pointers. But can't seem to remember the correct way to call the constructor when …

Member Avatar for deceptikon
0
289
Member Avatar for nyfan68

I was wondering if anyone could assist me with an assignment. The problem deals with operator overloading. In this assignment I have to modify a class called "Complex" to a)enable input and output of complex numbers via overloaded>> and << operators b)overload the multiplication operator to enable multiplication of two …

Member Avatar for angel.ey.7503
0
494
Member Avatar for furalise

Hi What is the difference between using the **fstream** library to read a file....and using something like a procedure below using the FILE* object? There seems to be two ways to read a file? Thanks /* FEOF example */ #include <stdio.h> int main() { FILE * pFile; char buffer [100]; …

Member Avatar for furalise
0
826
Member Avatar for andrew mendonca

Here is the website for the assignment I am working on: http://view.samurajdata.se/rsc/5c1dd0b4/ Here is the website for my header file (MixedExpression.h): http://ideone.com/G9aC9D Here is the website for my library source file (MixedExpression.cpp): http://ideone.com/PfH8f0 Here is the website for my calculator client file (Calculator.cpp): http://ideone.com/4wGayu Here are the input lines: ( …

Member Avatar for Banfa
0
215
Member Avatar for nhrnjic6

I have a practise problem to write a function that takes 3 dim and dynamicly allocates 3d array with those values and then (PART THAT I DONT GET) : fills the 3-dimensional array with multiplication tables. What am I even supossed to do ?? Here's my code : int main() …

Member Avatar for tinstaafl
0
168
Member Avatar for SpottyBlue

I am kind of new creating the A1Z26 cipher generator. But this has a problem. Only the program generates the last two numbers. What's wrong? #include <iostream> #include <ostream> #include <string> using namespace std; int i; // Counter char str1[101]; // A string of characters for generator. string str2, str3; …

Member Avatar for tinstaafl
0
2K
Member Avatar for mixelplik

How can I loop through a data field with a binary search, looking for multiple values? Please, I don't want to know another, more efficient way, I want to do it this way to understand the concepts. Also my data is indeed sorted before the call is made. The data …

Member Avatar for mixelplik
0
1K
Member Avatar for skyyadav

implement a generic fn mapf with prototype template<class Sequence c , class UnaryFunction) Sequence mapf(Sequence c , UnaryFunction f) for ex if c is a seq containing the seq (3,2,7,6,8) and f is the fn that returns twice it integer agument. then container returned by mafc(c,f) is a list containing …

Member Avatar for mike_2000_17
0
382
Member Avatar for Andy_3

Write a C++ program that calculates the balance of a savings account at the end of a month period. The program should read from a file (bank.dat, downloadable from blackboard) the account number, the current balance and the account type. Depending on the account type, a different annual interest rate …

Member Avatar for Moschops
0
207

The End.