49,761 Topics
| |
Hi all, I have a double link list program that compiles ok, and when I run it, I get a message box saying that windows needs to stop the program. Here is the code: [CODE] #include <iostream> #include <conio.h> using namespace std; class linklist { private: struct dnode { dnode … | |
I am having a problem with the results that I am getting when I run my program, according to the math i wrote in the program when I enter these results object's x co-ord = 0 object's y cor-ord = 0 object's heading = 45 degrees object's distance travelled = … | |
Greetings to everybody, I am a programming greenhorn and I would like to make a programm which will generate a number in the way that first the user will say how many digits the number should have (i.e. 10 000) and will also specify the rules for creating the number- … | |
I am developing an interactive client and server system which can response to a typical Human's Interaction. This program is run in unix enviornment. There's a Q&A text file stored, in this format. [Question];[Reply] How old are you?;I Am 1 year old. basically the delimiter is a ';'. Is there … | |
First off, thank you for taking the time to read this. Here is my question: I am reading data in from a file that contains names for items that I will be placing onto a heap for use in a program. The program gives me all of the desired data … | |
Hi , can any one tell me how to generate an unique number ? this can be done in C# with great ease. But i wonder how to generate tat in c++:ooh: | |
I'm looking at this code and I'm not sure what it prints (I don't have a C++ compiler to run it). However, I also would like to understand why it prints what it does? hope someone can help, here's the code: [CODE] class A { public: virtual void p() { … | |
How we can make a nice table in C++ ? I always use "|" and "___" to manually create a a table, but it often messed up. Please give me some tutorial and if possible table's screenshot. Thank you as always^^. | |
Hallo everyone, I have some problems with my assignment. I asked to provide some error-handling in my program. What I want to ask abou how we handle an input that isn't its type. For example i define a variable int a but we "accidentally" input a string or other type. … | |
Could u please tell me , how to create webpage through Dev C++ and write output on webpage ? | |
How do I set a fixed number of places. for example I want 1 to be 01. this is what I've been trying, but never works for some reason. Does anyone know how to do this. Thanks. int i = 1; cout << setprecision(2) << 1 ; | |
How we can limit input data ? For example we only want the user to input 4 characters, user only can write up to 4 characters. Thank you fot your help. | |
Hey guys im new to C++ so if this is an dumb question all apologies. Whats going on is i am comparing a user entered major with one from a structure of information on students (name,hours,gpa,etc..). for this im trying to pull out majors in example say someone was a … | |
The following test code compiles and executes correctly: [code=c++] class RegExpTest : public Framework { template <class T> int reParseNumbers( std::string, std::set<T>&, double=-1 ) throw(Exception ); } template <class T> int RegExpTest::reParseNumbers( std::string s, std::set<T> & numSet, double set_size_limit ) throw( Exception ) { // do some regular expression stuff … | |
I am gettin this compile error and for the life of me cannot figure it out: [CODE] BinarySearchTree.h:22: error: type âintâ is not a direct base of âBinarySearchTree<int, int, std::less<int> >::BinaryNodeâ [/CODE] This is the header file file the error refers: [CODE=cplusplus] #ifndef BINARY_SEARCH_TREE_H #define BINARY_SEARCH_TREE_H #include <cstdlib> #include <functional> … | |
Could someone help me understand what is going to be returned in following piese of code and why (the processing logic) (I have no way to compile it by myself now....) [CODE=C++]struct A { int value; virtual int access() { return this->value; } }; struct B { int value; virtual … | |
I have googled the error and found nothing. This is the last bug I've been trying to work out and the only I haven't been able to figure out. Thank you for your time. I'm currently trying to test out a standard simple linked list class. I'm currently trying to … | |
Hi all, The following code is generated automatically in Microsoft c++: [code] // InventoryAssignment(BETA).cpp : main project file. #include "StdAfx.h" #include "Form1.h" using namespace InventoryAssignmentBETA; [STAThreadAttribute] int main(array<System::String ^> ^args) { // Enabling Windows XP visual effects before any controls are created Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); // Create the main window and … | |
Hi, i am using CMsFlexGrid in my project. the problem i m facing is the alignment of data ie when i store integer, double its getting aligned to right when i store strings its getting left aligned pls help. Display look very horrible :( .how to change it i dont … | |
Generic Double Linked List [CODE="C++"]/* These are generic Functions for a Generic List * Note:-Only Functions not including a Menu and an Interface * You could use these Functions for your own Benefit*/ #include <iostream> using namespace std; template <class X> struct node{ //Template Structure X data; node* next; node* … | |
Hello, I'm writing a a program in C++ that adds/subtracts complex numbers. I'm having trouble writing the square root of -1 or "i" in a complex number. Complex number: realPart + imaginaryPart * i (where i is /-1) ["square root of -1"] so far I'm thinking the code is something … | |
Hi all, I added a class named RandomVariableGenerator with the following functions in the .h file [code] static double GetRandomNumber(void); static double GetExponential(double beta); static double GetUnifrom(double a, double b); [/code] but after building them i got the following errors: Error 1 error LNK2020: unresolved token (06000002) RandomVariableGenerator::GetRandomNumber Error 3 … | |
I have a assignment that we are to write two clases (Ballot, Votes). We are to use an array of Ballot type to hold information for each particular Ballot. The Votes class is used to mark the ballots, count up all to votes, delete a ballot etc. I have the … | |
[CODE]am trying to login to a server, say my gmail account by sending it my username and password in a typical POST request. to make my life simpler i tested this code on www.campuser.net i was able to see the pages http requests using a firefox addon called tamper data … | |
Hi all, I used a function called GetRandomVariable to return a double data type and here's its code: [code]double GetRandomNumber(void) { // Zi = (AZi-1 + C)(mod m) // Zi = (5Zi-1 + 3)(mod 16) RandomVariableGenerator::Znode = (double)((5.0*RandomVariableGenerator::Znode + 3) % 16); return RandomVariableGenerator::Znode/16; } static double Znode = 7.0; … | |
hey..I need to convert a 8 value bool array to char.How can I do this? | |
i have an array weights[16][60] this being 16 rows of 60 elements in each one i have another error[16] which co incides with each with the 16 rows, this is the error from each row. is there a way i can put each of the 16 in order in the … | |
[code] #include <conio.h> #include <graphics.h> #include <math.h> #include <stdlib.h> #include <dos.h> void serp(int level, int Ax, int Ay, int Bx, int By) { int poly[4]={Ax,Ay,Bx,By}; setfillstyle(SOLID_FILL,YELLOW); if (level>0) { serp(level-1, Ax,Ay ,(2*Ax+Bx)/3,(2*Ay+By)/3); serp(level-1,(2*Ax+Bx)/3,(2*Ay+By)/3,(Ax+Bx)/2+sqrt(3)*(Ay-By)/6,(Ay+By)/2+sqrt(3)*(Bx-Ax)/6); serp(level-1,(Ax+Bx)/2+sqrt(3)*(Ay-By)/6,(Ay+By)/2+sqrt(3)*(Bx-Ax)/6,(Ax+2*Bx)/3,(Ay+2*By)/3); serp(level-1,(Ax+2*Bx)/3,(Ay+2*By)/3,Bx,By); } else fillpoly(2,poly); } int main(void) { int graphdriver=DETECT, graphmode; initgraph(&graphdriver, &graphmode, ""); int i, … | |
I need to create a Space Invaders kind of game and I have a demo I need to copy the main features from. The invaders have to be of at least 3 different types and they change color. So I figured the invaders are 3 child classes from a parent … |
The End.