48,986 Topics
| |
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 … | |
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; … | |
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> … | |
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; } | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
Hello, can anyone help me in searching code for hand gesture recognition system using opencv in c++. Thanks | |
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.. | |
**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.** | |
how do i better understand pseudocode and solve problems that concern it | |
whats the best language to use for developing video and image compression apps | |
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++) … | |
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; … | |
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. … | |
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) … | |
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 … | |
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); … | |
write a program that will ask the user to input students marks, computes the grades and give out their comment | |
#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 … | |
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 … | |
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 … | |
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 … | |
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[]) … | |
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); … | |
`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 | |
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 { … | |
can anyone show me how to write a 2 * 2 matrix multiplication program. |
The End.