49,761 Topics
| |
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 … | |
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. | |
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() { … | |
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 … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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) | |
void main ( ) { int a = 12; a = a << 2; cout << a ; } what that means `a = a << 2;` how that works | |
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 … | |
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. … | |
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 | |
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 … | |
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 … | |
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] | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
[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 . | |
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 … |
The End.