49,761 Topics

Member Avatar for
Member Avatar for bonnie1702

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 …

Member Avatar for ArkM
0
107
Member Avatar for cam875

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 = …

Member Avatar for cam875
0
96
Member Avatar for rastaberry

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- …

Member Avatar for rastaberry
0
137
Member Avatar for AcidG3rm5

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 …

Member Avatar for AcidG3rm5
0
311
Member Avatar for JimD C++ Newb

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 …

Member Avatar for JimD C++ Newb
0
201
Member Avatar for koushal.vv

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:

Member Avatar for ArkM
0
142
Member Avatar for vladdy191

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() { …

Member Avatar for dougy83
0
134
Member Avatar for akira_shinizaki

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^^.

Member Avatar for Agni
0
89
Member Avatar for akira_shinizaki

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. …

Member Avatar for ArkM
0
71
Member Avatar for san_sarangkar

Could u please tell me , how to create webpage through Dev C++ and write output on webpage ?

Member Avatar for TheBeast32
0
61
Member Avatar for imput1234

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 ;

Member Avatar for imput1234
0
62
Member Avatar for akira_shinizaki

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.

Member Avatar for Lerner
0
262
Member Avatar for OhItsThatGuy

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 …

Member Avatar for ArkM
0
233
Member Avatar for scotchfx

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 …

Member Avatar for StuXYZ
0
185
Member Avatar for DLightman

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> …

Member Avatar for DLightman
0
125
Member Avatar for alex5161

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 …

Member Avatar for ArkM
0
119
Member Avatar for LustrousWS6

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 …

Member Avatar for StuXYZ
0
98
Member Avatar for Fouly

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 …

Member Avatar for Fouly
0
116
Member Avatar for koushal.vv
Member Avatar for koushal.vv

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 …

0
104
Member Avatar for Ahmed_I

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* …

Member Avatar for ArkM
0
190
Member Avatar for ohnomis

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 …

Member Avatar for ohnomis
0
856
Member Avatar for Fouly

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 …

Member Avatar for Fouly
0
163
Member Avatar for deusieeee

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 …

Member Avatar for omeralper
0
614
Member Avatar for leowdeo

[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 …

Member Avatar for Paul.Esson
0
158
Member Avatar for Fouly

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; …

Member Avatar for Fouly
0
154
Member Avatar for AutoC
Member Avatar for AutoC
0
4K
Member Avatar for 666kennedy

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 …

Member Avatar for 666kennedy
0
183
Member Avatar for bids

[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, …

Member Avatar for bids
0
141
Member Avatar for emotionalone

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 …

Member Avatar for cikara21
0
222

The End.