48,986 Topics
| |
#include <iostream> using namespace std; struct node { node * right, *left; int info; bool lthread,rthread; }; class tree { private: node *temp,*current; public: node *root,*Dummy; void insert(node*,int); void inorder(node*) ; node* next_node(node* ); tree() { temp=root=current=NULL; Dummy=new node; Dummy->left=root; Dummy->right=Dummy; Dummy->rthread= Dummy->lthread=false; } } ; void tree::insert (node *temp,int … | |
Hello , first of all I need to make clear that although I understand , and have done projects modifying code that is already there (and created my own minions) , in the core of C and C++ I wouldn't consider to know those a bit, I have just a … | |
Hello, I'm capturing frame from cameras devices using V4L, but now I have to capture from IP Cameras, and I don't know how to start it. Please, can anybody tell me how can I do it, some API or something like that?! Thanks!! | |
| I honestly have no clue how to go about this. Need some assistance on the following questions: 1. Modify the program to subtract (num1 – num2). If num2 is greater than num1, swap the values of the variables using a variable named temp, using the partial code below. if (num2 … |
The program seems to be building fine however I can only get it to return "Your tax amount is: 0.00". I've stared at the thing for hours and cann't for the life of me find my problem/problems. Any suggestions are extremely appreciated. /* * File: main.cpp * Author: Callie Tester … | |
/***************************************************\ * This program imagery dice rolling * * Write by : saeid asaadian * * Create date : 11 - 14 - 2015 * * Version : 1.0 * \***************************************************/ #include <iostream> #include "conio.h" #include <ctime> #include <cstdlib> #define random(x)(rand()%x) #define randomize()(srand(time(0))) using namespace std; int main() { cout … | |
For some time I have been using a utility called [forcebindip](http://old.r1ch.net/stuff/forcebindip/) It's purpose is to start an application and force it to use a specific network adapter. So if you wanted to start IE on an adapter that is not the default, you can start it with this commandline utility … | |
This project is based on the banking system, UTT Insurance Limited. Each month the company calculates commission for its employee. UTT Insurance Limited has 5 employees and their names are Denver, Garry, Cindy, Samdaye and Nalinee. Each employee has their respective sales for the month which is recorded in an … | |
I had a function I used a while back to test the pixel colors in a given screen rect, it was something like this pseudo code. for (int y = t; y <= b; y++){ for (int x = l; x <= r; x++){ color = GetPixel(hdc_, x, y) & … | |
Enter a string: [I]house[/I] (a)esuoH (b)ESUOH (c)esuoh (d)EhuoS (Last and 2nd letter changed positions) - I'm done with (b) and (c), and I don't know how to execute the remaining 2. Any suggestions? Here's my code: [code=cplusplus] #include <iostream> #include <string> #include <locale> using namespace std; int main () { … | |
Hello All, I am having trouble looping through a 2D array in C++ (should be very easy, but I am just starting C++). At the current moment I have this class file #include "Cube.h" #include <freeglut.h> #include <stdio.h> Cube::Cube(int cx, int cy, int cz , int cubeWidth) { int p[][3] … | |
Is there a way to catch a "program.exe stopped working" Windows error? I am not sure what to look for, or even where to look, in my code. I have the code repeat a rather complicated algorithm using different data several times. It runs fine for 27 iterations and then … | |
hi guys . i run this code but when i input the password it dosent show star against password . whats the problem ? #include <iostream> #include "conio.h" using namespace std; int main() { const int pass = 6004; char ch = 0; int ans = 0; cout << "Please … | |
please help me write a program that lets the user enter 5 integers then outputs the folllowing a. whether the integer inputted is odd or even b. determines the largest and smallest number inputted c. sum all odd integer entries d. sum all even integer entries here is the partial … | |
1.Write a C++ function that intakes 2 arguments: a character and an integer and prints the character given number of times.If ,however, the integer is missing the function prints the character twice. | |
I am having trouble figuring out an efficient way to perform the checks for how a winner is determined in a 3D tic tac toe program (that is 3x3x3). Winners can be three spaces in any vertical, horizontal, or diagonal, including those between the 3 "boards." There are over 50 … | |
I have to create a random matrix m*n where m and n are user inputs. Now i have to fill the matrix with random nos. Finally I must have a matrix where each value is either 0 , 1 , a fraction no between 0 and 1, and also sum … | |
how to do this? write a c++ program that given the name of a text file reads that file and counts the number occurrences of each alphabetic letter in the text. treat upper and lower case instances of a letter as the same letter. hint: look up tolower()---testing the case … | |
Can anyone please tell me what is the problem in my code: void Laptop::show() { Computer::show(); cout<<"weight is="<<weight<<endl; cout<<"height is ="<<height<<endl; cout<<"length is ="<<length<<endl; cout<<"width is ="<<width<<endl; } I am unable to call Computer::show(); function in Laptop::show(); function.Compiler says to use . or -> operator i am unable to understand. … | |
| Exercise Three: In this exercise, you will create a program that gets two numbers from the user and checks to make sure the first number is less than the second number. It should then display the sum of the even numbers between, and including, the two numbers entered by the … |
I am trying to create a method entitled rolledOneOnlyOnce that takes in two integers as parameters and returns a Boolean. This method must be public and static. In this method, the integer parameters represent the values currently on each of the Game’s die (die1,die2 respectively). Here, you will want to … | |
This is a program for Encryption and Decryption This program uses the Simple Data Encryption Standard (SDES) Algorithm. This Algo takes 8-bits of plaintext at a time and produces 8-bits of ciphertext. It uses 10-bits of key for Encryption and Decryption. | |
char patron10(int m , int n ) char patron10(int m , int n ) { for ( int = 0 ; i < m ; i++) cout<< "." ; int a = 0 ; while (True) { cout<< 10*a ; if (10*a >= n) break ; for ( int i … | |
Hi, I'm working through the 3rd chapter of Thinking in C++ Vol 1 by Bruce Eckel (free online). I am using Code::Blocks as my IDE. I've try searching for this problem through the forum but haven't found a solution; I think it might be a IDE-specific problem. The undefined reference … | |
Using an initialization list for a class array variable, what do you use to setup a slot with a 3parameter Ctor? | |
How does an array variable indexing expression differ from an array definition size expression? | |
The following is a similar program I had when having trouble: float x; int n=0; cout << "enter some numbers separated by space; enter 1.2 when done: "; cin >> x; while (x!=1.2) { n++; cin >> x; } The problem is, when using certain numbers as the sentinel (in … | |
Linux Mint 17 I have recently download the SFML library but I don't know where to put the files. There is a lib directory and an include directory. The lib directory appears to have a lot of sym links in it. garrett@mint-desktop ~/Desktop/SFML-2.3.2/lib $ ls -l total 904 lrwxrwxrwx 1 … | |
i'm trying getting the richedit caret positions. seems that i can't use the caret functions. LONG firstCharIndex(HWND hwnd) { POINT pt; pt.x=0; pt.y=0; LONG n = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&pt); return LOWORD(n); } COORD GetCaretPos( ) { COORD pos; //getting the line from caret position: pos.Y=(LONG) SendMessage(consoleedit, EM_LINEFROMCHAR,(WPARAM)-1,0); CHARRANGE cr; … | |
I'm in the process of designing a console personal/business finance package for Linux. It's easy to identify the advantages of data abstraction through classes, but I'm not inclined to become proficient with STL or containers. Exception handling may become a consideration, but definitely memory allocation via "new". My own implementation … |
The End.