49,761 Topics

Member Avatar for
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
148
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
361
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
181
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
328
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
149
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
80
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
84
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
164
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
174
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
200
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
342
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
134
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
115
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
71
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
91
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
86
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
99
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
61
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
335
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
175
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
82
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
117
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
95
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
169

The End.