48,986 Topics

Member Avatar for
Member Avatar for san467

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

0
100
Member Avatar for jkon

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 …

Member Avatar for jkon
0
276
Member Avatar for GnnG

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!!

Member Avatar for sarathbandaru
0
1K
Member Avatar for nana_1

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 …

Member Avatar for nana_1
0
642
Member Avatar for Callie C.

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 …

Member Avatar for ddanbe
0
197
Member Avatar for Saeid_1

/***************************************************\ * 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 …

Member Avatar for vasanth19
0
212
Member Avatar for Suzie999

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 …

Member Avatar for Kanoisa
0
404
Member Avatar for diane110

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 …

Member Avatar for David W
0
291
Member Avatar for Suzie999

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) & …

Member Avatar for Suzie999
0
1K
Member Avatar for violet101

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 () { …

Member Avatar for larz_1
0
586
Member Avatar for sirlink99

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

Member Avatar for David W
0
468
Member Avatar for tgreiner

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 …

Member Avatar for tgreiner
0
328
Member Avatar for Saeid_1

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 …

Member Avatar for rproffitt
0
211
Member Avatar for progteacher2

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 …

Member Avatar for Taywin
0
111
Member Avatar for karthik16

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.

Member Avatar for Nick Evan
0
227
Member Avatar for Hoofy

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 …

Member Avatar for Jamie_9
0
1K
Member Avatar for san_man

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 …

Member Avatar for ddanbe
-2
311
Member Avatar for norEdz

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 …

Member Avatar for David W
0
11K
Member Avatar for me vicky

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

Member Avatar for David W
0
361
Member Avatar for nana_1

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 …

Member Avatar for nana_1
-1
275
Member Avatar for libreriaeben

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 …

Member Avatar for JamesCherrill
0
143
Member Avatar for Luckychap

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.

Member Avatar for overwraith
1
13K
Member Avatar for Nick_11

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 …

Member Avatar for Taywin
0
260
Member Avatar for plucesiar

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 …

Member Avatar for tomek3211
0
491
Member Avatar for DS9596

Using an initialization list for a class array variable, what do you use to setup a slot with a 3parameter Ctor?

Member Avatar for rubberman
0
135
Member Avatar for DS9596

How does an array variable indexing expression differ from an array definition size expression?

Member Avatar for rubberman
0
137
Member Avatar for sgw

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 …

Member Avatar for Suzie999
0
293
Member Avatar for lewashby

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 …

Member Avatar for mike_2000_17
0
396
Member Avatar for cambalinho

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

Member Avatar for cambalinho
0
543
Member Avatar for ShiftLeft

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 …

Member Avatar for ShiftLeft
0
1K

The End.