49,761 Topics

Member Avatar for
Member Avatar for skiing

I am really confused on this problem someone please assist me I am suppose to create a random number generator that passes in a high and low value and return a random number using a generator that is not biased. It makes use of the idea of cuttoff. I know …

Member Avatar for kvprajapati
0
126
Member Avatar for atch

Hi, in my code below if I move scope protected below public just as I would like to see it this code won't compile. I always thought that order of members in class is without any importance but here I see something different or I'm doing something wrong? Thank you. …

Member Avatar for jesseb07
0
103
Member Avatar for aliaks

Ok, so as suggested I have rewritten this thread. It was suggested that the code posted to be shortened and only revelent code be posted. I did both of these and people started asking where all different things were, and why cant they see other files etc. Uploaded is the …

Member Avatar for NathanOliver
0
143
Member Avatar for tarekwehbe

sale_item sale_item::operator + (sale_item &s2){ } sale item is a class how to overload this operator sale_item::sale_item(const char N[],const char C[],double P){ } this is the constructor

Member Avatar for NathanOliver
0
70
Member Avatar for Hawkpath

Hello, I'm writing a rubiks cube solving program, and I would like to condense all of the turn definitions into functions like rightTurn(); I'm using Windows XP and Code::Blocks. An example of a turn definition is : [CODE]cout << "Executing bottom turn: " << endl; a = front[6]; b = …

Member Avatar for Hawkpath
0
106
Member Avatar for mrnutty

Forgive me Admin. Now that I got your attention. I just wanted to say one thing. PLEASE put meaningful titles on your thread. No, [U]Help[/U], [U]Urgent!![/U], I[U] HATE C++[/U], or even worse "[U]UNTITLED[/U]". Instead, put titles, like [U]help creating a recursive add function[/U], or [U]help I don't understand this homework …

Member Avatar for John A
0
158
Member Avatar for basitchk
Member Avatar for Stefano Mtangoo
0
82
Member Avatar for iamsmooth

Hey guys: I'm working on a chess program for comsci, and surprisingly, the pawn is the hardest piece to program. If you're not familiar with chess, this is the basic move of the pawn: If the pawn is in its initial position, it can move 2 spaces forward, however, subsequent …

Member Avatar for wildgoose
0
250
Member Avatar for madhavb

How do I access the base class protected/public methods in a derived object ? For example A and B are as defined below... [code=cplusplus] class A { int a; protected: int set(int v){ a = v; }; public: A(){}; int foo(){ return 0;}; }; class B : A { int …

Member Avatar for tazboy
0
82
Member Avatar for daviddoria

I know you can't usually define things in the class like this: [code] class MyClass { double DefaultForward[3] = {0.0, 1.0, 0.0}; }; [/code] but I have some values that don't really make sense to set in the constructor - they are more "deeply connected" as THIS SHOULD ALWAYS BE …

Member Avatar for daviddoria
0
147
Member Avatar for Stefano Mtangoo
0
55
Member Avatar for lotrsimp12345

word is a private variable. MAin [code] #include <iostream> #include "FrameThePhrase.h" using namespace std; int main() { Frame_The_Phrase frame; char in; ifstream input; bool a=true; bool b=true; bool c=true; string length; while(b==true) { cout<<"to quit type 'q'\n" <<"enter 'c' to get from console\n" <<"enter 'f' to get from file\n"; cin>>in; …

Member Avatar for lotrsimp12345
0
156
Member Avatar for amarucla

Hi All, I'm developing GUI for my project. I'm working in Windows and using VC++ 2008. I've found some examples, on internet using which I've developed a dailog box window (like shown in attached figure) using win32 api. The example has a list box and few buttons. I managed to …

Member Avatar for amarucla
0
354
Member Avatar for rip_snoopy

hi i need help to sort a file in terms of CourseCode i have this file COURSE.DAT In the file this is the format.... <CourseCode>|<CourseName>|<SubjectArea>|<TeacherID|<Date>|<NoEnrolled>|<Support> <CourseCode>|<CourseName>|<SubjectArea>|<TeacherID|<Date>|<NoEnrolled>|<Support> eg of this file(raw) CS10|Computing|CS|20845|12-12-2008|12|1 MA10|Mathematics|MA|20845|12-12-2008|12|1 PH11|Physics Practical|PH|20845|12-12-2008|12|1 CS11|Computing Practical|CS|20845|12-12-2008|12|1 PH10|Physics|PH|20845|12-12-2008|12|1 i need it to be sorted (the end result should be this CS10|Computing|CS|20845|12-12-2008|12|1 …

Member Avatar for VernonDozier
0
111
Member Avatar for kiel19

Hi. I would like to build a web crawler, but I am only familiar with C and C++. Can any one give tips on how to develop one using those two environments. I have a Borland 4.5 compiler that I will be using.

Member Avatar for Protuberance
0
349
Member Avatar for licktress

Hey guys, I'm making a program that asks the user to input a folder path (string), which it then displays the contents of said directory, but the problem I have is that it won't accept space bars, it just screws up and enters into an infinite loop. So is there …

Member Avatar for Protuberance
0
259
Member Avatar for bernadlosini

the question given like this The TetraPek manager assumed that you are already familiar with the game rules. Now, the manager wants your program to be able to auto-generate some numbers before the player gets to key in their numbers into the empty boxes. It is up to you how …

Member Avatar for mrnutty
0
231
Member Avatar for himgar

Since gotoxy() function can have maximum values (35,25) I want to know is there any alternative to this which i can use in Turbo C++ 4.5 version. I have to make a project and therefore i urgently require a one for a better look of my project.

Member Avatar for Ancient Dragon
0
113
Member Avatar for tarekwehbe

guys my instructor gave me a project : a file that contain 5 text files 2 for sale_item( header file, cpp file_ 2 for sale file ( header file, cpp file 1 for main ------------------------------------------------------------- to start u need 2: 1. create new project 2. call it the same name …

Member Avatar for mrnutty
0
127
Member Avatar for dzhugashvili

Here is my code: [CODE]#include <iostream> #include <string> #include <vector> #include <algorithm> #include <fstream> #include <stdlib.h>//(for atoi to work) using namespace std; void usage() { cout << "Usage: <input1> <input2> <output>\n"; cout << "\n see README for more details.\n"; exit(1); } int main(int argc, char *argv[]) { cout << "\nshmoosh …

Member Avatar for Ancient Dragon
0
141
Member Avatar for sara khan

Hello..,, I have read about a function used in file handling named as "peek". If anyone knows about this function then plz tell me.....

Member Avatar for VernonDozier
0
214
Member Avatar for mauriciomf

How a function can modify an AnsiString passed to her (and how i can pass AnsiStrings to functions)? Someone can give an example? Im using borland c++ 5.0

Member Avatar for beryllium9
0
541
Member Avatar for macla

Hi, How to terminate running script (programmatically) in windows. For example i am running sleep(50000). I want terminate this command execution. Any WinAPI ?

Member Avatar for JugglerDrummer
0
58
Member Avatar for atch

Hi, I've got structure like this class Object //abstract { virtual....=0; }; class Monster : public Object {}; //also abstract class Wumpus : public Monster {}; class Hero : public Monster {}; class Gun : public Object{}; class Cave : public Object { void add(Cave*); void add(Monster*); }; the second …

Member Avatar for atch
0
120
Member Avatar for compiler777

Hello all, I am a new member to this forum. I am learning C programming language here in my local place. I want to know how a while loop is written. I have been given a simple assignment to be done that is "to print even numbers from 1 to …

Member Avatar for lllllIllIlllI
0
75
Member Avatar for el33t

Please consider the below code. 1 #include <QApplication> 2 #include <QLabel> 3 int main(int argc, char *argv[]) 4 { 5 QApplication app(argc, argv); 6 QLabel *label = new QLabel("Hello Qt!"); 7 label->show(); 8 return app.exec(); 9 } Now, I'm abit doubtful about line 5. According to the book(from which I …

Member Avatar for el33t
0
121
Member Avatar for jen140

Hello again. I'm now looking for a way to see if the current user has admin rights. I tryied the Iczelions way, and it always says that i dont have admin rights (on vista) . The next code i dont remember where i found, but it always says that the …

Member Avatar for jen140
0
156
Member Avatar for mandofl

Hello once again. I'm trying to do one last project, but unlike the others, that usually i struggle with some common errors, this time i have problems figuring out how its supposed to be created. This is the question: Write a class named Employee that has the following member variables: …

Member Avatar for mandofl
0
4K
Member Avatar for onecarloz

I have to create a small bank program here are the instructions any help is appreciated Write a program that allows users to enter a dollar amount for their bank account balance at the beginner of the month. Then ask the user to enter dollar amount for any number of …

Member Avatar for onecarloz
0
127
Member Avatar for ambarisha.kn

Question: Declare a pointer to a function taking an int argument and returning a pointer to a function that takes a char argument and returns a float. I did code as follows. But it is giving error. Please correct this. [code=C] #include <iostream> using namespace std; float func(int x)(char c) …

Member Avatar for Duoas
0
229

The End.