49,761 Topics
| |
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. | |
So, I have heard about code porting, basically where you take existing code from one language, and translate it to another language. What I want to know is how does this process work? Are there automated tools for preforming this type of thing, or is it always a manual process? … | |
i want to make an artificial system in c++ language for a doctor or any judge that will take input from the user and by using rule of inference it will display the result as true or false, can anybody help me to solve this problem | |
| I am in the process of making a small game-engine for educational purposes, and I have come accross a very fustrating error. When debugging the program with the c++ gdb debugger an error occurs on the `glGenVertexArrays(0, &m_vertexArrayObject);` - line 21 in the implementation of the `addVertices` method, line in … |
Hi there, well, i have homework of packet sniffing software i'm not suppose to write the code,but i need to make a report of an existing code and explain it in details. I found the following code somewhere(the code should be of a packet sniffer) ,but i couldn't run it.I … | |
im studying in class 12 and i need a project for my school assessment. im not looking for those boring library management,hotel management and stuff but something interseting which will force me to think. i know a little bit of graphics to the extent that ive made program to draw … | |
Hello guys I need your help im really new in C++ and I need to do easter calculation to get the right easter day, at the moment I could get one year. Example: Year 2015 Easter Day in 2015 is/5/4/2015Year but my professor is asking me to get year range … | |
Hello Everyone! I am wondering about the thory behind the box blur. I have an assignment, and I wrote a program implementing the box blur the way it was described in my assignment which is "When centered on a pixel, its values are multiplied with each corresponding surrounding pixel values, … | |
Create a teacher class (teacher name, ID, department, subject currently handled)and student class(student name, regno, subjects, teacher, marks(cae1,cae2,assignment), log) such that the teacher class id made a friend of student class. Allow the teacher class to update the student information like marks and also maintain an entry in the student … | |
Hi, I'm trying to compute a moving average of length 20. I've got a vector of structs that's read into my function and I'm using an iterator to read through as follows: int length = a; int count = 0; double sum = 0; while (itr!= priceinput.end()) { sum += … | |
All, I am wanting to be able to "read" hand writing. I have managed to get the hand written characters from papers. I now - to the computer - have just pixels on paper (output is in .pdf format). I want to have the computer be able to convert the … | |
#include <iostream> using namespace std; int main() { const int password=123; const string username = "abc"; int pass; string user; cout<< "Enter your username"<<endl; cin>>user; cout<< "Enter your Password"<<endl; cin>>pass; if (pass==password) && (user==username) { cout<< "Access Granted"<<endl; } else{ cout<< "username And Password Incorrect"<<endl; } cout << "Hello world!" … | |
when naming the constant in C++ program, WHY DOES IT IMPORTANT TO NAME FOR EXAMPLE INCHES_PER_FOOT ? | |
Hey, i need c++ coding to print sum of this series 1 + 1/11 + 1/21 + 1/31 + ... + 1/N Would be great if someone could answer this quick, thanks. | |
i was given an assignment to create a word construction game where the program will randomly picks a combination of vowels and consonants and the user will build as much words as possible from the choosen letters. my prog will check for the correctness of the words and gives the … | |
Hi Guys, In my current task , I need to read the read the approximately 10,000 recoreds from database and need to store the same in container.Now i need to select container to store all this records inorder to generate the report.Could you let me know whether i need to … | |
Hello , I've been working for an hour now searching for a solution for a problem i have for tomorrow's workshop so I wanted to be ready for it and here was the question : Write a program that reads 3 integers. Then, display: The count of positive integers … | |
i need just an intro about Matrix. what is Matrix and what i can do? i understand that i can rotate, scale, mirror and more. but can i swap pixels?(convert red to green) i don't know so much about Matrix intro :( |
The End.