51,593 Topics

Member Avatar for
Member Avatar for lola_fcis

[code]void Delete(TreeNode* tree, ItemType item) { if (item.ComparedTo (tree->info)==LESS) Delete(tree->left, item); else if (item.ComparedTo( tree->info)==GREATER) Delete(tree->right, item); else DeleteNode(tree); // Node found } void GetPredecessor(TreeNode* tree, ItemType& data) // Sets data to the info member of the right-most node in tree. { while (tree->right != NULL) tree = tree->right; data …

Member Avatar for Narue
0
80
Member Avatar for foxmulder

Hi! I was wondering if someone might have an example of this that I might could take a look at, would really appreciate it since we have a test in about a week. Thanks in advance! Adam

Member Avatar for NathanOliver
0
137
Member Avatar for xka

Hi, I am a total newbie to programming, so I do not know much about it. However I have created this very basic program which converts 2 currencies. I would appreciate it if I received some constructive criticism so I can improve my programming skills. Thanks, xka [CODE] #include <iostream> …

Member Avatar for jonsca
0
186
Member Avatar for __kanth

Hi Guys Is there any function in C which will help me make an input string invisible while we are entering the input?? I mean similar to oracle login. when we type our oracle password at dos prompt it is not visible. My requirement precisely. 1) I want to read …

Member Avatar for __kanth
0
188
Member Avatar for ishaiman

Problem Statement: Expense class You are required to write a class name “Expenses “. Expenses class has· Constructors· Destructor· Write a function to add expenses for a month· Write function which displays these expenses.· Write a function which calculates savings for a month. · Expense class has following data members …

Member Avatar for Salem
-2
74
Member Avatar for nerdinator

How to make a time based regular function?Like something that plays a sound every 1 second?

Member Avatar for Salem
0
121
Member Avatar for sisse56

1. //program to write the information of patients registered 2. // and physician available in the hospital.The program asks 3. //the user to register physician,register patient, 4. //list all available physicians and lisit all registered patients 5. // depending on the interest of the user. 6. #include<iostream> 7. #include<cstring> 8. …

Member Avatar for WaltP
-2
130
Member Avatar for s_mostafa_h

Hi All , there is an application for 8051 processor that when u write ur code in asm , and then convert to hex file , [URL="http://chaokhun.kmitl.ac.th/~kswichit/easy1/easy.htm"]this application [/URL](EZDL.4) , it Write ur programm to the Microntroller . apparently , this win application written in C++ . thanx for any …

Member Avatar for s_mostafa_h
0
254
Member Avatar for ctpsolo

I recently got into coding dll's and now I'm interested in having my own injection routine code to spare time and effort instead of using general injectors. However it seems impossible for me to find a source to study that actually does the job. I've been all over the net …

Member Avatar for Ancient Dragon
0
162
Member Avatar for twoshots

I've been writing a Python module which contains a few classes. As I have come to use the module in earnest it has become clear that I need to create a _very_ large number of instances of these classes. This is using more memory than I would like. Speed is …

Member Avatar for twoshots
0
169
Member Avatar for luliana

hi I wanna ask about virtual function.. why we use it & when? and what is the different between friend function & member function in class?? :)

Member Avatar for Narue
-2
75
Member Avatar for sapphyr

Hi, I'm trying to make a program that prints a solid square of asterisks based on the side size entered by the user. The code builds fine but it doesn't work when I try to run the program. I get some code (looks like hex)? Please help! [CODE] #include <iostream> …

Member Avatar for sapphyr
0
159
Member Avatar for Web_Sailor

Hi, I have a data I want to make fix length records Like suppose:- [CODE]one two three four one two three one[/CODE] In this case the fixed length should be of the maximum string length which is of the first line. My code below is giving creating faulty fix lengths. …

Member Avatar for jonsca
0
234
Member Avatar for nerdinator

How do I fill a part of the view (in mfc vc++)with a color.Like say,I just drew a circle,how do I fill it with some color?

Member Avatar for nerdinator
0
334
Member Avatar for foxmulder

Hi! I was just wondering if any one could show me some example of how a function of this would look like? Heres the description: Write a program with a minimum of a function, which is used to locate and after returning x-th smallest number in an integer. Ex: given …

Member Avatar for foxmulder
0
106
Member Avatar for foxmulder

Hi again! I have these four different if-then that I hope someone could help me with. [CODE] int i, j; cin>> i>> j; if (condition) ( court << "The condition is true!" <<endl; )[/CODE] Create conditions so that the condition is true if a) j is not more than 5 …

Member Avatar for foxmulder
0
149
Member Avatar for sisse56

The program asks the user what they want to do by selecting their choice from the MENU. even in case 1. the program asks the user to input physician name ,but as I do it only works for single character for example.if I input physician name <Sisay> the loop goes …

Member Avatar for jonsca
0
107
Member Avatar for j1979c

I have some kinda problem each time i create a vector of strings. There is no error if I create vectors of other data types such as int, double, etc. Though there's no error...but there's warnings...and sometimes the program hangs if i do sortings. Here's an (without sorting but still …

Member Avatar for borlys
0
581
Member Avatar for nathan_jun2

Hello guyz!!! Please help me to search a records in text file. The text file written of this records: Ben 2010-0001 300.00 John 2010-0003 400.00 Mike 2010-0002 190.00 I want to input only the employee id and it will display the name and salary if that record is existed. Here's …

Member Avatar for nathan_jun2
0
121
Member Avatar for meghanetpulse7

This question is bugging me for past 3 months. I have no clue how to do it , though i am not programmer. But worse thing is coder who created software for me , got no clue. I even launched this project of sending reg keys 4 times to 2 …

Member Avatar for meghanetpulse7
0
124
Member Avatar for makan007

I am doing a program to get a sample infile.txt & ouput to outfile.txt I encountered alot of probs which I can't solve now. I am having issues reading from infile.txt & display the correct result in outfile.txt Pls enlighten me further. The program have to submit this Tue. My …

Member Avatar for jonsca
0
192
Member Avatar for wheelie

With regard to the following code. I have only included Memory.h in ClassA.cpp, but ClassB.cpp still seems to be able to see it. How do i make it so that ClassB does not use the operator new in Memory.h, but the usual one? Am am I right in thinking it …

Member Avatar for CppBuilder2006
0
119
Member Avatar for nschessnerd

Hey I'm trying to tell a remote process to run a command using (the other processes) command line (like cin). currently i use createremotethread and inject some asm into the process, but the thread sometimes conflicts with other threads and crashes the program. so now i am trying to use …

Member Avatar for nschessnerd
0
122
Member Avatar for mir_sheely

I am Making a STACK class which could hold a Binary Tree Nodes. I have defined a class Node. Then made a linkedlist classs. and finally the stack class. All are Template based. But during compilation it is giving me the following error. error: expected constructor, destructor, or type conversion …

Member Avatar for Fujur
0
3K
Member Avatar for mohamedqamar

hey xpert i'm class 12 cbse student...unfortunately i'm not able to get the output from my project. the project is based on bank employee detail.........i'm gettin the output ,but the thin is xcept aading records of the employee i'm not able to do other operation like modifiaction,deletion,listing...!!!!!!! your will be …

Member Avatar for Ancient Dragon
-3
177
Member Avatar for sodak

I'm writing a program that writes the Summary Information in the Properties dialog box for some files that I've created. In other words, when you right click on a file, click properties, and go to the summary tab, the fields such as: Title, Author, Category, and Comments should have some …

Member Avatar for jonsca
0
113
Member Avatar for CppBuilder2006

when a window is not active (eg it is minimized, hidden, or under other windows) it does not receive mouse click messages. I am going to write a program that produces a few circular waves around mouse pointer whenever the user clicks. my program is always hidden & so it …

Member Avatar for CppBuilder2006
0
254
Member Avatar for samsons17

why in this code the "codeArray[]" is used?? what does its really means?? [CODE] #include <iostream> using namespace std; void FunctionTwo (int codeArray[]){ cout<<codeArray[1]; } int main() { int codeArray[3] = {1,2,3}; FunctionTwo(codeArray); } [/CODE] Thank You for helping...

Member Avatar for gusano79
0
138
Member Avatar for coolfriend

Plan and code a guessing and betting number game, as described by the text below and the sample output but do not write any functions (other than main). An appropriate welcome message with your name in it should be shown at the start of the program. The user starts with …

Member Avatar for Nick Evan
0
89
Member Avatar for mrnutty

Some background. We all used the string class, but some of you might not know that string is just a typedef of basic_string. In fact here is the typedef you might find when looking in the XString library. [code] typedef basic_string<char, char_traits<char>, allocator<char> > string; [/code] This code snippet shows …

Member Avatar for Dave Sinkula
2
3K
Member Avatar for ibackus

I'm trying to write a very simple program to print out in the terminal the first 10 entries in a long binary file composed of floats. The idea is to make this work something like 'head' in the linux terminal (but for binary files). The problem I have is I …

Member Avatar for ibackus
0
141
Member Avatar for GyanPP
Member Avatar for GyanPP
0
147
Member Avatar for group256

Hi, I'm supposed to write a code of my TSP assignment using brute force algorithm. Although there are still some darkness about how to do it. I know what is TSP but I don't know how to start it. Let's say that we have 4 cities(A, B, C, D). Using …

Member Avatar for pecet
0
1K
Member Avatar for Austinnh

Greetings to all. I'm having an error that occurs whenever I try to build a project in Dev C++. I can compile an individual source file fine. I have tried reinstall. I only have this error on my laptop (Vista). Everything worked fine on my other computer (XP). I have …

Member Avatar for Austinnh
0
3K
Member Avatar for dpfaff

Hello People, I took a class in C++ about a year ago and really liked learning to write code and working with with programs. I did not do very well in the class, in fact i ended up with a C-. Recently I decide that I wanted to try agin, …

Member Avatar for Lerner
0
146
Member Avatar for noobday

I've been trying to compile a very simple c++ code ; when trying to compile on codeblocks it says : error - stray '\312' in program [CODE] #include <string> #include <iostream> using namespace std; int main() { char letter1, letter2; string lastName; cout << "Enter your two initials and last …

Member Avatar for noobday
0
880
Member Avatar for DTV

Is it possible to move the screen focus in allegro. Like, key[KEY_UP] would move the screen up on a map? Thanks in advance.

Member Avatar for DTV
0
70
Member Avatar for Kreddy89

Hi guys, I am getting similar "identifier cannot be found" errors, except with "mkdir" they look like: 1>------ Build started: Project: shot_detect, Configuration: Debug Win32 ------ 1>Compiling... 1>film.cpp 1>c:\documents and settings\kedar\my documents\downloads\shotdetect-1.0.86\shotdetect-1.0.86\src\film.cpp(22) : fatal error C1083: Cannot open include file: 'ffmpeg/swscale.h': No such file or directory 1>image.cpp 1>c:\documents and settings\kedar\my …

Member Avatar for Kreddy89
0
494
Member Avatar for phpangel

hi, i have the following code for tic tac toe game Human vs. Computer, it runs without problem but when i prompt for entering X or O, it gives an error, can someone help, appreciate the answer. here's my code: [CODE]#include <iostream> #include<conio.h> #include<process.h> using std::cout; using std::cin; char matrix[3][3]; …

Member Avatar for WaltP
0
1K
Member Avatar for ball3r

Hi guys, Firstly, a quick thank you to whoever put this site up, wealth of advice and everyone here sounds helpful. I'm quite new to C++ and programming in general so go easy on me. I'm trying to find a way through a maze from a given start point through …

Member Avatar for WaltP
0
5K
Member Avatar for pac-man

hi guys, I've created a function that returns the number of times a value resides in a container (in this case, vector). The user is able to specify were in the vector they wish to search for the value. [CODE] int number(int n, vector<int>::iterator start, vector<int>::iterator end) { int count …

Member Avatar for pac-man
0
231
Member Avatar for vedatsivri

Hi Everybody; I wrote a class that uses boost library to create thread. My thread function just do select operation for mysql database. Besides, I developed a client program to test server side, but server side gave 'segmentation error ' after fourth client request via socket. [CODE] void Thread::Start(void (*function)()){ …

Member Avatar for Salem
0
101
Member Avatar for subhan222

Hi, I am trying to embed python in c++. everything is working fine apart from couple of issue. what exactly i am doing is creating an API for C++ functions in my application to be accessible using python script. When i run a script its runs fine and when i …

0
108
Member Avatar for kavourdoukos

I had this:[CODE]classA* class[10];[/CODE] But now i dont know the exact number(10) and i want to put a variable there and i get a compilation error.What i should do instead?

Member Avatar for mrnutty
0
123
Member Avatar for Shillz

can anyone guide me how to run a c++ program inclusive of graphics through notepad++ by using borland compiler OR plz guide me hw to compile n run a c++ graphics prog in vista..as it's not possible by normal tcpp

Member Avatar for CppBuilder2006
0
983
Member Avatar for landonmkelsey

This code defines a new operator new in C++ such that the memory returned is in the shared memory segment rather on the heap. This code exists to prove a point. "Objectifying" shared memory. One can not overload the new operator but one can overload operator new. Reference the C++ …

1
427
Member Avatar for zukkoor

Im trying to write a golden section optimization search program. I have written it to this point and im getting 25 errors in it and i do not know how to fix them. I am new to programming and did do research on the errors and am still unsure. I …

Member Avatar for jonsca
0
3K
Member Avatar for jesminn

Hello All, I have some questions regarding C++ and ASN.1: 1. I have a C++ class with several data structures, which themselves hold different types of variables. Can I create an abtract model of such a class with ASN.1? 2. I also plan to write a program later on, that …

0
41
Member Avatar for san_fran_crisko

Hi, Apologies if this has been covered already - I searched but couldn't find anything relevant. I am looking to learn both of these languages mainly because I am in a bit of a dilemma career-wise. To be as concise as possible (this aint no agony aunt page I hear …

Member Avatar for Narue
0
286
Member Avatar for ilikelampard

Hi, What is the difference between CObList and CList? If we use a CList as - CList<CObject*, CObject*>, is it similar to CObList?

Member Avatar for ilikelampard
0
213

The End.