49,761 Topics

Member Avatar for
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
413
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
565
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
316
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
354
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
430
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
306
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
94
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
291
Member Avatar for Benny Adams
Member Avatar for rubberman
0
40
Member Avatar for overwraith

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? …

Member Avatar for deceptikon
0
244
Member Avatar for charmie
Member Avatar for mzee rajput

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

Member Avatar for bernardo.mclobo
0
134
Member Avatar for Caperski

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 …

Member Avatar for Caperski
0
203
Member Avatar for wannas

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 …

Member Avatar for Mahesh_14
0
5K
Member Avatar for akshaydixi

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 …

Member Avatar for Darackht
-2
3K
Member Avatar for lusito92

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 …

Member Avatar for rubberman
0
204
Member Avatar for sirlink99

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, …

Member Avatar for JamesCherrill
0
552
Member Avatar for simran_5

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 …

Member Avatar for David W
0
166
Member Avatar for toneranger

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 += …

Member Avatar for toneranger
0
187
Member Avatar for ParPau

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 …

Member Avatar for LaxLoafer
0
491
Member Avatar for directorabbey

#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!" …

Member Avatar for zelrick
0
124
Member Avatar for Medusa Tomsin

when naming the constant in C++ program, WHY DOES IT IMPORTANT TO NAME FOR EXAMPLE INCHES_PER_FOOT ?

Member Avatar for 0x69
0
102
Member Avatar for k3rry41o

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.

Member Avatar for ddanbe
-2
105
Member Avatar for surayanbo
Member Avatar for NathanOliver
0
108
Member Avatar for prgmmgbgnnr

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 …

Member Avatar for prgmmgbgnnr
0
235
Member Avatar for can-mohan

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 …

Member Avatar for can-mohan
0
165
Member Avatar for Sara_13

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 …

Member Avatar for David W
0
286
Member Avatar for cambalinho

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 :(

Member Avatar for ddanbe
0
79

The End.