48,986 Topics

Member Avatar for
Member Avatar for toneranger

Hello, My function below is part of a program that compiles and runs. The core of the program is in the function below. The issue is that the variable named "PNL" below as well as "CumLoss" and "CumProfit" don't reset to 0 when the loop "L" restarts. So the output …

Member Avatar for tinstaafl
0
185
Member Avatar for DS9596

I'm getting these types of errors: identifier "gm" is undefined or expected a ';' How do I fix these errors? #include <iostream> #include <cstdlib> //srand #include <ctime> //time #include <cmath> #include <string> using namespace std; int G_master; int m_secret; int m_choice; int m_win, m_prev_delta; int Number_guess; int Card_guess; int delta; …

Member Avatar for David W
0
455
Member Avatar for ravi_14

Hi All, I am trying to implement generic link list in c++ . But getting below error . Please assist me to correct it. LinkedList.hpp LinkNode<E>* head; errr: unknown tpe name ''LinkNode // LinkNode.hpp // cplus // // Created by Ravi Rathore on 10/12/15. #ifndef LinkNode_hpp #define LinkNode_hpp #include <stdio.h> …

Member Avatar for deceptikon
0
284
Member Avatar for LibraryCode

Hi,how would i need to change this code to accept strings insted integers in avl tree? template<class T> void InsertItem(TreeType<T>& tree) { cout << "Enter number: "; int num; cin >> num; tree.InsertItem(num); cout << "Number inserted:" << num; }

Member Avatar for deceptikon
0
343
Member Avatar for stef02

Hello, so I needing some help with creating a program for my class. The lab requires us to use pointers. This is the description of what we have to do... -Write a function that accepts an int array and the array’s size as arguments. -The program should ask the size …

Member Avatar for David W
0
312
Member Avatar for keval_hack

[I]Interesting tricky program using C & C++: [/I] [B]Program 1:[/B] Create a Program which produce output "Hello World" , the program must not contains semicolon ; in other word any statement of the program will not have a termination semicolon. [B]Program 2:[/B] Write a C or C++ program which run …

Member Avatar for Ahamed_1
-1
2K
Member Avatar for loldafuq

Here is what i have to do 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 double …

Member Avatar for tinstaafl
0
353
Member Avatar for tiger86

I've decided to write a Website in C++. I am sick of dealing with languages that layer on top of other languages, so I just want to write it in C++. I know about CGI++, but I was wondering if there were any other tools or methods used for writing …

Member Avatar for zelrick
0
3K
Member Avatar for chubbyy.putto

what I am trying to do is store same letter to same node. For example: let say I have person, people is sent to be put into a node. This will create two node. I want to some thing like P: Person People Person and People are same note When …

Member Avatar for bernardo.mclobo
0
412
Member Avatar for Saddam_2

Hello, can anyone help me in searching code for hand gesture recognition system using opencv in c++. Thanks

Member Avatar for bernardo.mclobo
0
90
Member Avatar for Muzammilwaqar

hello!! i need a source code that takes integer value as input from user and then print equilant alphbetic form of that number range is 0 to 99 and minimum number of lines /statements used ?? can any oe help me with that..

Member Avatar for rproffitt
0
89
Member Avatar for Sumit_3

**I was wondering if a mp3 file can be opened with OpenFileDialog box and the whole path of the mp3 file is returned in constant unicode character, i.e. LPCWSTR. I am using Dev-Cpp. Please tell me solution for mingw-based compiler.**

0
95
Member Avatar for adu benjamin

how do i better understand pseudocode and solve problems that concern it

Member Avatar for JamesCherrill
0
165
Member Avatar for GOMEZ_1

whats the best language to use for developing video and image compression apps

Member Avatar for JamesCherrill
0
214
Member Avatar for Ahmed Padela

Please help me to solve the following program in C++ array. After compile message appears [B]"Possible use of "i" before definition.[/B] [code=c++] #include<iostream.h> #include<conio.h> void selsort(int [],int); void main() { int AR[50],N,z; clrscr(); cout<<"How many elements do U want to create array with?(max.50)....."; cin>>N; cout<<"\n Enter Array elements.....\n"; for(int i=0;i<N;i++) …

Member Avatar for David W
0
575
Member Avatar for ArpitJ.25

How does random and randomize functions work? Please help me! What are the different outputs that can be predicted from this program? And How? Explain. #include<iostream.h> #include<stdlib.h> void main() { randomize() int Game[] = {10,16},P; //what does this mean? int Turn = random(2) + 5; for(int T = 0; T<2; …

Member Avatar for David W
0
142
Member Avatar for Juan_11

So i am new to c++, I don't know what is wrong with my program, I keep looking for the issue but can't find why it won'r run. So i am trying to develop a program which reads the numbers the user inputs and convert those into rows of asterisks. …

Member Avatar for David W
0
457
Member Avatar for CreatorZeus

So I'm working with time.h for this (copied from msdn): int main( void ) { struct tm newtime; char am_pm[] = "AM"; __time64_t long_time; char timebuf[26]; errno_t err; // Get time as 64-bit integer. _time64( &long_time ); // Convert to local time. err = _localtime64_s( &newtime, &long_time ); if (err) …

Member Avatar for triumphost
0
2K
Member Avatar for TheFearful

Hey guys, I am trying to figure out how to do a double transposition cipher. This is what I have so far to take in a string and then put that string a 2x2 array of a fixed size that I made. I have the key that I want to …

Member Avatar for TheFearful
0
2K
Member Avatar for cambalinho

i have these code for save a structure data to a file and then read it: struct user { string name; image foto; string adress; int age; }; user usrName={"joaquim",image("C:\\Nova pasta\\acrobat.bmp"), "viseu",32}; user usrName2; FILE* f = fopen("C:\\Nova pasta\\username1.dat", "w+b"); if(f==NULL) DebugText("error"); fwrite(&usrName, sizeof( user), 1, f); fseek(f, 0, SEEK_SET); …

Member Avatar for Herry_1
0
375
Member Avatar for judyo

write a program that will ask the user to input students marks, computes the grades and give out their comment

Member Avatar for zelrick
0
179
Member Avatar for Anonymous_1

#include <iostream.h> #include <stdio.h> #include <conio.h> float get_time_start (int message) {float t; if (message==1) cout<<"Enter Start hour:"; else cout<<"Enter Start minute:"; cin>>t; return(t); } float get_time_end(int message) {float t; if (message==1) cout<<"Enter End hour:"; else cout<<"Enter End Minute:"; cin>>t; return(t); float determine_bill(float sh, float sm, float eh, float em, int …

Member Avatar for Moschops
0
549
Member Avatar for zampi91

Hi everyone, I have registered a rotary encoder in /dev/input/event0 and i try to test it with evtest. This is the output of the test: Input driver version is 1.0.1 Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0 Input device name: "rotary.4" Supported events: Event type 0 …

0
306
Member Avatar for booglaoogla

Write a C++ program to determine a student's grade. It reads three test scores (between 0 and 100) and calculates the average score and converts it to a letter grade. Grade Conversion Rules: rule a. If the average score is 90 or more the grade is 'A'. rule b. If …

Member Avatar for triumphost
0
351
Member Avatar for directorabbey

i am designing an app. The first stage is to allow the user to select a username and password. The system stores it and uses it as an authentication during login. my question is: do i use a fucntion or an array to capture the login info for the first …

Member Avatar for jwenting
0
79
Member Avatar for LibraryCode

Hi,have slight problem,my delete function does not work in avl tree: #include "stdafx.h" #include "TreeType.h" using namespace std; // menu helpers int ShowMenu(void); template<class T> void ProcessMenu(TreeType<T>& tree); // callbacks template<class T> void InsertItem(TreeType<T>& tree); template<class T> void DeleteItem(TreeType<T>& tree); template<class T> void PrintTree(TreeType<T>& tree); int _tmain(int argc, _TCHAR* argv[]) …

Member Avatar for tinstaafl
0
429
Member Avatar for Matthew_12

I can not get this program to compile, the problem lies in the method inputData. Does anyone see anything wrong it? #ifndef JEDI_H #define JEDI_H #include <stdlib.h> #include <iostream> #include <string> #include <fstream> using namespace std; class Jedi { public: Jedi(string name, int maxHealth, int currHealth, int attackBonus, int defenseBonus); …

Member Avatar for tinstaafl
0
305
Member Avatar for Cess_1

`help me to program lucky nine card game, a human vs computer . need to shuffle the deck and then give 2 cards for each player but human can get another card. display the total score of human . after, remove used cards from the deck

-1
93
Member Avatar for LibraryCode

Hi,i have a code like this in .h file: #pragma once #include "stdafx.h" #include"iostream" using namespace std; // balance factor enum enum BalanceFactor { LH, RH, EH }; // treenode struct template<class T> struct TreeNode { T info; TreeNode<T>* left; TreeNode<T>* right; BalanceFactor bf; }; template<typename ItemType> class TreeType { …

Member Avatar for LibraryCode
0
290
Member Avatar for Benny Adams
Member Avatar for rubberman
0
40

The End.