49,757 Topics

Member Avatar for
Member Avatar for jimmymack

[CODE]// erase.cpp - Script 4.1 // We need the iostream file in order // to use cout and cin. #include <iostream> // Start the main function. int main() { // Declare a variable for the user input. // Single character to store yes (Y) or (N) char answer; // Prompt …

Member Avatar for jimmymack
0
105
Member Avatar for eman 22

I have an error in my project and I can't fix the problem [CODE] #pragma once class Node { int code; int count; Node* parent; Node* rightChild; Node* leftChild; public: Node(int c1,int c2); void setCode(int c); void setCounter(int c); void setRightChild(Node n); void setleftChild(Node n); void setParent(Node n); int getCode(); …

Member Avatar for MattyRobot
0
116
Member Avatar for Dexxta27

Here is the class definition that I have so far: [CODE]#ifndef SAVINGACCOUNT_H #define SAVINGACCOUNT_H #include<iostream> #include<string> class SavingAccount { public: /** Default constructor */ SavingAccount(); /** Default destructor */ ~SavingAccount(); string getfirstName() const; string getlastName() const; static double modifyInterestRate();//static method declaration static double calculateMonthlyInterst(double,double); void setannualInterestRate(double); double getannualInterestRate() const; private: …

Member Avatar for ravenous
0
172
Member Avatar for esraa waqfi

[CODE]#include <iostream> #include <cassert> using namespace std; struct node { int number; bool high_priority; node *link; }; class linkedPriorityQueue { private: node *high_priority_front, *high_priority_rear, *queue_front, *queue_rear; public: linkedPriorityQueue(); void addQueue( int number, bool high_priority ); void deleteQueue(); int front(); int back(); bool empty(); bool full(); void print(); int size( bool …

Member Avatar for esraa waqfi
0
152
Member Avatar for dynamyt3

Does anyone knows what is the version of the C++ Builder in the image bellow ? [URL="http://www.escomposlinux.org/sinner/dibus/sinner7.jpg"]http://www.escomposlinux.org/sinner/dibus/sinner7.jpg[/URL]

Member Avatar for francis77
0
52
Member Avatar for lochnessmonster

[CODE] std::string function(std::string buffer) { int Variable1 = 23; if( !buffer.compare("Variable1")) <--- i want the user to input the variable name..and have my program match the input with the variable name of the program and return the value it contains return Variable1; [U]<--- How do i convert this number into …

Member Avatar for Caligulaminus
0
103
Member Avatar for daviddoria

I was under the impression that you could completely gaurd anything you wanted with an [icode]#if 0 [/icode]. Apparently this is not the case? I found some code that has opening /* comments but no matching closing */, and the /* seems to comment out the [icode]#endif[/icode], resulting in everything …

Member Avatar for daviddoria
0
132
Member Avatar for mi2010

i don't know how can i start or what classes i need in this project (wav player) with functions (play,stop,pause,record,mute) thanks in advanced

Member Avatar for triumphost
0
127
Member Avatar for 02marks

Hi, I am trying to write a program for my mum who is a teacher, the program needs to be able to store students information like their name address SAT scores etc. I have a basic background in c, but i decided to try and implement this program using c++. …

Member Avatar for thelamb
0
200
Member Avatar for gla41247

Hi there ! Actually I am a beginner in c++ and i have a problem to convert pseudocode to c++. Hope that anyone can help me Input : number of people, height of persons Process: division, addition, comparison (greater than and smaller than) Output : smallest height, tallest height, number …

Member Avatar for Fbody
0
334
Member Avatar for narlapavan

how to known whether system is available or not at the time of start up of operating system in unix systems

Member Avatar for L7Sqr
0
139
Member Avatar for sha11e

It's soon time for me to create some c++ program as a project for my class. But I have no idea what to do, any suggestions?

Member Avatar for floatingDivs
0
101
Member Avatar for karthik.chopper

Hey guys, I have a problem. I created a quick sort program and it functions perfectly for quantity less than 100. I searched for errors and changed and now for more than 100 values, it runs perfectly and sometimes it hangs. I am unable to decipher whats the error. Did …

Member Avatar for mbulow
0
410
Member Avatar for Loki55

Probably easy for you guys but I'm not sure if I have this right!! Original function [CODE]int testing (int c, float d) { if (d > c) return (int) d; else return c; }[/CODE] What I need to do: The function returns the decimal value resulting from dividing d by …

Member Avatar for EmilyJohnson
0
96
Member Avatar for moey187

I need help with a flowchart in a question I'm doing. I've completed the programming code but just have no idea on flowcharts if anyone can give me an idea on how to do this then I'll appreciate it. This is the question: Write a C++ program that reads from …

Member Avatar for moey187
0
96
Member Avatar for CodyOebel

Maybe you can help me here triumph, or anyone else for that matter. I have users running my program on various operating systems, and am running into two common problems. The window\game window my program sends messages to and gets pixels from is an older direct x game coded in …

Member Avatar for ashishchoure
0
472
Member Avatar for Behi Jon

Hi, I want to know what is allocator in C++ STL exactly ? For example what is the difference between the two following statements : [code] vector< int, allocator< int > > v1; vector< int, allocator< char > > v2; [/code]

Member Avatar for arkoenig
0
140
Member Avatar for loafie55

I'm having a lot of trouble with a project for school. The project calls for me to create a random guessing game with three different levels. Each level should consist of a random number between 1 and 30. I have set my code to show between 1 and 5 for …

Member Avatar for loafie55
0
2K
Member Avatar for Taibah

Hi all, Im started to learn windows.h libary. I want to add example some buttons with messages with more stuff in it but where i need to put that code i didnt find any torial about it can somebody help me out. [CODE]#include <windows.h> #include <stdlib.h> #include <string.h> #include <tchar.h> …

Member Avatar for Ancient Dragon
0
250
Member Avatar for Dexxta27

Can someone please explain these functions when creating a class please. Searching hasn't helped much. I need to know how they are used and examples or links to examples would be helpful. Any help is appreciated.

Member Avatar for Dexxta27
0
132
Member Avatar for Deepo

[CODE]#include <iostream> using namespace std; int main( ) { int num1 , num2 , num3; cout << "Please Enter Three Valid Integers Using The Keyboard"; cin >> num1 , num2 , num3; if {num1 => num2} && {num2 => num3} else num1 + num2; if {num2 => num1} && {num1 …

Member Avatar for emanfman
0
249
Member Avatar for aaisha

i have to make this board game in visual c++. i got the source code in c from a website. but it has some problem and isnt' running. moreover,its a hectic task to convert it into c++ for my use. if anyone who has worked on scrabble cud help me …

Member Avatar for Narue
0
2K
Member Avatar for goldeneagle217

I created an application in C# and then was told it had to be started from a button selection in a C++ exec program. How do I invoke my application from the C++ program?

Member Avatar for Suzie999
0
152
Member Avatar for fandango

I currently have a functor that finds the closest entity (by calculated distance) to the current entity. (Vector3 is just a 3D coordinate class) [CODE] template<typename T> class MinDistanceBGE { private: Vector3 v; // The location of the 'asking' entity. public: MinDistanceBGE(Vector3 vInput):v(vInput) {} bool operator()(T t1, T t2) const …

Member Avatar for fandango
0
374
Member Avatar for jnewing

[CODE] // foo vector of unsigned chars // contains 0x00, 0x00, 0xb8, 0x01, 0x00, 0x00, 0x00, 0x1F, 0xEC 0x82 std::vector< unsigned char > foo; long some_long = (long)&foo[6]; // i want the unsigned chars 0x00, 0x1F, 0xEC 0x82 to // make up the long decimal value of 2092162 [/CODE] Now …

Member Avatar for Insensus
0
209
Member Avatar for Zvjezdan23

I am making Yahtzee and this is what I have so far. This is my ThingsThatNeverChange.h header [CODE]#include <iostream> #include <iomanip> #include <cstdlib> #include <string> #include <algorithm> #include <ctime> #include <windows.h> #include <conio.h> #include <dos.h> #include <math.h> using namespace std; char savenum = 'y'; char rollAgain = 'y'; int i; …

Member Avatar for daviddoria
0
217
Member Avatar for Kontext

I am currently writing a program that uses OpenGL and so it uses the include file: #include <GL/glut.h> Now when I try to compile and run the program I get this message in the error folder: "fatal error C1083: Cannot open include file: 'glut': No such file or directory" Lastly, …

Member Avatar for daviddoria
0
247
Member Avatar for rumala13

hey everybody can any1 tell me what cpuh.h directory work ? or used for what ? :O and how to include this directory ? :O

Member Avatar for daviddoria
0
79
Member Avatar for goldeneagle217

I created an application in C# and then was told it had to be started from a button selection in a C++ exec program. How do I invoke my application from the C++ program?

Member Avatar for Ancient Dragon
0
180
Member Avatar for daviddoria

If I want to generate all combinations of a set of numbers 0-max, I can do so with for loops. The following code will output all two-number pairs: [code] for(unsigned int i = 0; i <= max; i++) { for(unsigned int j = 0; j <= max; j++) { cout …

Member Avatar for nezachem
0
207

The End.