51,593 Topics

Member Avatar for
Member Avatar for nekomata

hello, I seem to have lost part of my notes an was wondering if someone could plz explain how one would use the pi formula below to display a 10000, an 20000, and a 10000 value. pi = 4(1- 1/2 + 1/5 - 1/7 + 1/9 - 1/11 + 1/13 …

0
39
Member Avatar for ice_tea_lemon

I find a problem which says An approximate value of pi can be calculated using the series given below: Pi = 4 [ 1 – 1/3 + 1/5 – 1/7 + 1/9 … + ((-1)n)/(2n+1)] Write a C++ program to calculate the approximate value of pi using this series. The …

Member Avatar for nekomata
0
170
Member Avatar for gretty

Hello I have a task to perform an addition of 2 Big Integers. Each Big Integer is stored in a linked list in reversed order. [B]Is my add function correct?[/B] For eg; we have 2 Big Ints to add together [QUOTE] First BigInt = 245 { strored in the linked …

Member Avatar for gretty
0
410
Member Avatar for NinjaLink

Hello, I need some advice to help me write a program to convert postfix to infix. However, I am having difficulty getting started. I tried to search for more information, but all I got was infix to postfix results. This is what I have so far, but I want to …

Member Avatar for tsfaridi
0
199
Member Avatar for pinsickle

I am currently working on polymorphism in class, part of my homework is the classic point inside a shape test. I always have access to the lower left point of the triangle and it is always assumed to be isosceles. Last year I solved this problem using linear inequalites but …

Member Avatar for pinsickle
0
157
Member Avatar for coachHinesfan

Hello everyone. I recently installed Windows 7 and I am looking for a development environment that is very compatible with it other than Microsoft Visual C++ Express Edition. I ask because i have never used another development environment. Thanks for your help in advance.

Member Avatar for jbennet
0
393
Member Avatar for raghunayak

Hi all, This is my first post here. Basically I want to use friend classes across namespace. eg: [CODE]#include <iostream> namespace NamespaceA { class ClassA { public: friend class ClassB; void print( ) { std::cout<<std::endl<<data<<std::endl; } private: int data; }; }; namespace NamespaceB { class ClassB { public: ClassB() { …

Member Avatar for raghunayak
0
2K
Member Avatar for isralruval

when i compile i get an error message saying the following "51: error: assignment of read-only location" line 51 reads: c[i][j] = a[i][j] + b[i][j]; any help to get rid of this problem???[code]#include <iostream> #include <iomanip> using namespace std; #define N 3 void addMatrix(const double a[][N], const double b[][N], const …

Member Avatar for Xasmus
0
184
Member Avatar for jupitertrooper

Hi I am working on some code for my class that requires me to validate a floating point number. Once the user enters the number I have to check to see if it is valid, and it is only required that I check the first digit. so if -80 was …

Member Avatar for mrnutty
0
347
Member Avatar for UKmason

I am very new to computer programming and am struggling with my Computer Science class... I have been working on this program all week long... My assignment is to ; Write a float function that will have four float parameters. The four parameters represent two Cartesian points, 2 x's and …

Member Avatar for mrnutty
0
151
Member Avatar for restrictment

How do I add an array? I tried this: [code] #include <iostream> #include <cstdlib> using namespace std; int main() { int i, numEntered, total; int number[10]; for (i = 0; i <= 9; i++) { cout<<"Number: "; cin>>number[i]; numEntered = number[i]; } for (int i = 0; i < 10; …

0
82
Member Avatar for SCoder1

Hi, I'm sorta new to c++ I've tried messing around with java but I like c++ better for it's speed. I think the reason why I'm still a newbie at this is because I can't grasp the scientific concept of the syntax. But enough small talk...... I can't seem to …

Member Avatar for SCoder1
0
86
Member Avatar for restrictment

Hey, I have been searching this for a while now, and I cannot find a c++ code that expands the window once opened. I have found multiple codes that claim it opens it in an expanded window, but in the end all I get is compiling errors. If someone would …

Member Avatar for SCoder1
0
168
Member Avatar for gsingh2011

I need to call a script on a website but I don't want to open a browser. I have the code in python as, response = urllib2.urlopen('http://www.sygmd.org/email2.php?message=' + message) but I need this to work on all windows computers, not just the ones with python and I can't make the …

0
72
Member Avatar for ebrutekim

[CODE]#include <iostream> #include <string> #include "Python.h" using namespace std; #define py PyRun_SimpleString(pythonCommand.c_str()) int main() { string pythonCommand; //Python started Py_Initialize(); pythonCommand = "import sys";py; pythonCommand = "from math import sqrt";py; pythonCommand = "sys.setrecursionlimit(1000000)";py; //factorial function pythonCommand = "def ft(x): return(1 if x==0 else x * ft(x-1))";py; //equation using function pythonCommand …

Member Avatar for ebrutekim
0
179
Member Avatar for Gem74

when I compile, there are no errors, but when I run the program it tells me there are build errors and then "the system cannot find the file specified." I have copied and restarted a new project, then new item and still get same error message. Can someone tell me …

Member Avatar for Gem74
0
203
Member Avatar for swolll

I've been working on a piece of code for a while, and it works as it is intended to. Now, though, I'm trying to the code down so that there is one main functions and every "action" is a function that is called. But, I have very little experience with …

Member Avatar for swolll
0
369
Member Avatar for noey699

First of all I would like to point out that all my values are correct in boxes[5][4] which contains the two x and y values needed for each box. boxes[0][0] and boxes[0][1] are the x and y value for the top left of the rectangle. boxes[0][2] and boxes[0][3] are the …

Member Avatar for noey699
0
139
Member Avatar for Shinedevil

Ok, I'm completely stumped. I heard that allegro was pretty cool. So I wanted to try it... you don't have to read this { Now here is my story over the past 48 hours... I downloaded all these things for allegro like version 4.2 or something like that, then tried …

0
117
Member Avatar for osmano807

Hello, I need to generate a unique id of a computer, but in theory even if it format the computer, the id remains the same. I thought of mac address, but is not guaranteed to be very unique. Working with Linux (Debian, Arch Linux)

Member Avatar for Clinton Portis
0
72
Member Avatar for salloum

void main ( ) { int a = 12; a = a << 2; cout << a ; } what that means `a = a << 2;` how that works

Member Avatar for kolosick.m188
0
73
Member Avatar for ausrasul

Hi, I've wrote two applications in C++ using TCP sockets (winsock). my compiler is Mingw (Dev-cpp). using windows XP SP2. application A send four packets, 5 bytes length each. application B supposed to receive those packets one by one whenever it has time. the problem is that when B have …

0
65
Member Avatar for XiaO yuEn

Lojban is a consruted language designed based on the Loglan language created by Dr James Cooke Brown in 1955. The numbers zero to nine in Lojban are as follows: 0=no 1=pa 2=re 3=ci 4=vo 5=mu 6=xa 7=ze 8=bi 9=so Larger numbers are formed by combining the digits which form them. …

Member Avatar for Grn Xtrm
-3
93
Member Avatar for XiaO yuEn

Write a program that input number of students and determine smallest classroom that can accomodate those students. A sample run : Enter number of students: 79 Classroom: B

Member Avatar for XiaO yuEn
0
88
Member Avatar for fpx-studio

Hello. As some of you know I'm working on a game engine and I'm making a video diary about it. So this is the 4. episode of that diary. In general, I'm talking about all the new stuff that I did in my engine. To learn more, you can see …

0
102
Member Avatar for XodoX

Hello, These 3 codes had 5 syntax errors in each of them, but I don't think I found them all. Can somebody help me with this? [code] class AA { public: void print( ) const; int sum(); AA(); private: int x; int y; }; class BB { int one; int …

Member Avatar for XodoX
0
63
Member Avatar for raigs

How can the webpage that is downloaded be stored inside a variable? [CODE]#include <iostream> #include <cstdlib> using namespace std; int main(void) { int VAR = system("wget http://www.google.com"); return 0; }[/CODE]

Member Avatar for Ancient Dragon
0
337
Member Avatar for oskar132

so im trying to read a file and get each line of this file and put it in some array, the line i get is of type char and my array is of type string so i dont know if im doing something wrong there, so i try to add …

Member Avatar for th3learner
0
110
Member Avatar for sharkman

Please help quickly! I'm on short notice here. I'm making a C++ program for a project, and the computer I'll need to run it on does not have a compiler. I am currently using Microsoft Visual Studio 2003. I would very much like to turn this file into an executable …

Member Avatar for sharkman
0
180
Member Avatar for proactive_07

Write the program that ask user insert 5 type integers of an array for student number for each course(MECHA : 280, IART : 150, HVAC : 200, FJ : 180, ASMT : 150) program must calculate the total student & percentage each course

Member Avatar for Clinton Portis
0
85
Member Avatar for abhipro

Hi everyone, I have a library in C++ ( All source and header files) which was targeted for Linux. Although, the authors say that with some minor changes, it can be compiled on Windows too. Also, when I checked the .CPP files, some do the following code #ifdef WIN32 #include …

Member Avatar for abhipro
0
120
Member Avatar for hopeful man

hi everybody, i was reading some lessons regarding Recursion, and then i came across a question that i couldn't answer it ,, therefore i need your help in this question, the question is : Write a program to accept an integer value and find the factorial from 10 to 1 …

Member Avatar for Grn Xtrm
0
88
Member Avatar for bahr_alhalak

[COLOR="Red"] account No. ....... Pin No........Name........Balance[/COLOR] ex: [COLOR="Green"]a0910........21996........james........210.000[/COLOR] 1) write a program to store data instance for 50 customers , and sort in the order of account no and take a report of all customers. 2) To store a data in a file .

Member Avatar for Md. Asaduzzaman
-2
97
Member Avatar for itzaaron

This program collects 3 numbers from the user and then simple adds the total and spits out a response. problem is the final output is blank, it just says 'The total is: '_____ but nothing there. Whats wrong?? [CODE]#include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int …

Member Avatar for itzaaron
0
173
Member Avatar for ikea

I need some interesting topic for my school project. Theme of the project can be • Any subsystem of a System Software or Tool • Any Scientific or a fairly complex algorithmic situation. • Business oriented problems like Banking, Library information system, Hotel or Hospital management system, Transport query system …

0
100
Member Avatar for brijendra_kumar
Member Avatar for brijendra_kumar
0
52
Member Avatar for raigs

Does C++ wait for a *system* shell command to finish before executing the rest of the C++ code? (The shell script does not output any text, it simply executes *find* to *rm* files.) I'm saying this because the shell script [U]may[/U] take a long time to find and delete all …

0
64
Member Avatar for amishraa

the char character for grade are coming up with weird ascii like characters instead of the letter grades. Please help! //declaration string first, last; int prog1, prog2,prog3,prog4, prog5, test1, test2; int totalpts, progavg, testavg, courseavg; char grade; //executables totalpts = (prog1+prog2+prog3+prog4+prog5+test1+test2); progavg = (prog1+prog2+prog3+prog4+prog5)/5; testavg = (test1+test2)/2; courseavg = (progavg+testavg)/2; …

Member Avatar for amishraa
0
208
Member Avatar for tomtetlaw

I am trying to make a 3D Engine using OpenGL, I've got all the model loading, 3D nodes, all that stuff done, but I get linker errors when I try to compile, it.. these are the errors: ------ Build started: Project: TheAlienEngine, Configuration: Debug Win32 ------ Compiling... main.cpp core.cpp ae_3d.cpp …

Member Avatar for Dave Sinkula
0
215
Member Avatar for narmeen

i need source code of 3D playmobil police station in visual c++ using console application.

Member Avatar for Phil++
0
49
Member Avatar for Darth Vader

I wonder for something. If it is possible to replace for example * with any kind of variable that holds either: + - * / Something like: [code] Variable = *; double Number1 = 5; double Number2 = 10; double NewNumber = 0; NewNumber = Number1 [B]Variable[/B] Number2; [/code]

Member Avatar for Darth Vader
0
256
Member Avatar for new programer

Hello, I've been wondering about how to make shapes out of stars (*). Like a rectangle and different stuff. Is there a way for that ? and how ? Thanks all,

Member Avatar for VernonDozier
0
171
Member Avatar for kiryoku

Get the remarks of ten employees on three items... the remarks is determined by comparing the total sale of an employee to the average of the group.. i've done this already..dont know to add the items...and get its average... its only the input... #include<iostream> #include<conio.h> using namespace std; int i,n[10],it,item[3]; …

Member Avatar for Sky Diploma
0
84
Member Avatar for minkoko

i want to about C and C++ project? show me a window GUI project for me i not understand about this i make project for my frist learning it include main.c , .h, .rc ,and i not know about this please explain me ,if possible tutorial for me sorry bad …

Member Avatar for kvprajapati
0
92
Member Avatar for qamarullah

Assignment Write a C++ program to implement employee directory, which will let the organization to perform the following functions: 1) Insert the record of new employee 2) Delete the record of an existing employee 3) Find the record of an existing employee 4) Display Report Following information of each employee …

Member Avatar for kvprajapati
-1
144
Member Avatar for Jigg1yPuff

ok, so i've read most of the stuff here to help with sorting string arrays in alphabetical order, but i got more confused... i need some1 to take a look at my program and see where i went wrong. also, i need help in getting the largest,smallest,and average... yes, i'm …

Member Avatar for John_conner
0
191
Member Avatar for samsons17

Hi people... I'm still new in c++.. I got the problem with the recent assignment that i have to do... This is the assignment that i got... [ATTACH]12228[/ATTACH] my problem is i dont know how to display all the value that the user entered into a single receipt...when i tried …

Member Avatar for samsons17
0
132
Member Avatar for SgtMe

Hi. Firstly, I am a complete noob, and cannot understand complicated answers. OK. I'm making a noobish space game, called Galactic Armageddon. I'm just testing the variables right now (for getting hit by lasers, missiles, etc.). I'm compiling using Dev-C++ and the default compiler. The program is written using the …

0
172
Member Avatar for MedianHansen

[code] #include <SDL.h> #include <iostream.h> int main(int argc, char* argv[]) { //initialize SDL and the video system. if (SDL_Init( SDL_INIT_VIDEO)<0) return -1; //signal SDL to change the text of the main window to SDL "Hello World". SDL_WM_SetCaption("Hello world","Hello World"); //Create an SDL_Surface object, which represents, the game window. SDL_Surface* screen=SDL_SetVideoMode(640,480,0,0); …

Member Avatar for SgtMe
0
939
Member Avatar for volscolts16

I'm writing code for an address book that the information will be output to a text file in alphabetical order. I have most of the code, and I have done this kind of thing before, but it has been over a year since coding. So, just a start would be …

Member Avatar for ariel1304
0
103

The End.