49,761 Topics
| |
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 … | |
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. … | |
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 … | |
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 | |
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 = … | |
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 … | |
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 … | |
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 … | |
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 … | |
Please someone help me how to populate wxListCtrl (in report mode) Thanks | |
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; … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
Hello..,, I have read about a function used in file handling named as "peek". If anyone knows about this function then plz tell me..... | |
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 | |
Hi, How to terminate running script (programmatically) in windows. For example i am running sleep(50000). I want terminate this command execution. Any WinAPI ? | |
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 … | |
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 … | |
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 … | |
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 … | |
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: … | |
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 … | |
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) … |
The End.