49,762 Topics
![]() | |
I have an assignment where I'm supposed to "implement a class, Point that represents a point in a three-dimensional space." and im supposed to "carefully design the interface for this class and include functions that appear to be useful for operating on points." I'm not fully sure what this is … | |
so i need some help. I'm trying to create a matrix that will do all these functions.. but im not so sure what im doing wrong since im an inexperienced at c++. Anyone? Gratzi! [CODE]#include <math.h> #include <iostream> #include <string> //#include <matrix.h> using namespace std; #define MAXNUM 9 class Matrix … | |
[QUOTE]Sometimes, storing an image is easier if you store the steps taken to draw the image rather than the image itself. In such a situation, a sequence of directed lines are concatenated, or attached to one another, to form the image. For example, a simple drawing program might allow eight … | |
hello everyone, Im a student having to write a C++ program and im running into an error that I have been unable to find the solution on my own. Im running into an error as I test run the program to make sure everything is still ok. The program isnt … | |
I have to make a function under class record that returns a pointer person class data type. I am assuming that this means setting a person object to equal to the returned pointer person class type but in order to do that It looks like i need to make an … | |
how could I do this program? Using pointers can I create a Tagalog - English translation program that requires the user to input a sentence, and the program must output a rough English translation which should also be in a sentence form? Any Idea or codes to help me make … | |
Hi there, I am trying to get my head around the bubble sort but I don't seem to get it. Now I have a program written by somebody which performs a bubble sort and I am trying to understand it but no much success. Here is the code: [CODE]#include <iostream> … | |
Dear All, I am very new to programming and really appreciate if you can help. I am using XCode as editor My code is below: [CODE] int main (int argc, char * const argv[]) { char a[10][25]; char *ptr_a; ptr_a = (char *)a[10][25]; for (int index = 1; index < … | |
Why I can't get this program complied ? I am geting " 20 expected unqualified-id before '{' token " [code] #include <iostream> using namespace std ; int answer(int num[] ,int num ); main () { int ary[10] ; cout << " Please Enter 10 integer values" << endl ; for … | |
Hello, I am fairly new to programming, so any help would be much appreciated. Basically this program gets a file with the contents like: hello one one Tt then sorts these into a binary tree, i can do that fine, however what i am struggling with is converting this to … | |
[CODE]/* This program reads a test score, calculates the letter grade for the score, and prints the grade. */ #include <iostream> using namespace std; char studentScore (int score); int main () { cout << "Enter the test score (0-100): "; int score; cin >> score; char grade = studentScore (grade); … | |
I am working on a simple program, and i am using Visual C++ Express Edition. Everything is fine, i am processing the integers and i am copying them into an integer array. But the problem is when i m trying to access that integer array for further processing or to … | |
I am trying to define centroid in the following code as centroid is part of the private data for this class. But when I output the data it reads 0, 0 instead of the real values. Vec is a 3 dimension class that i have created. I'm not sure what … | |
hello, i have a simple question: how can i make 2 variables to have the same address. For example, if i write: [CODE]int a = 10; int &b = a;[/CODE] everything goes ok "a" and "b" have the same value and the same address but what ai need is: int … | |
please run this simple program...... why wont this work ? i tried it first with if...else [code]/*why will this program not run? what did i do wrong with the if else statements/conditions ?*/ #include <conio.h> #include <iostream.h> main() { double sales, sales_amount, quantity, total_sales, vat; total_sales = sales + vat; … | |
how to delete every 3rd node in a circular linked list? After deleting that node, the node is continued to count from the node and again deleting the 3rd node? Do u have any ideas? | |
Hi guys, Do you know of any C++ libraries can can generate SOAP messages using the WSDL. I am writing a C++ client application and am looking for such a library. I however cannot use gSoap and wsdlpull. SOAP Client library (SQLData Systems) looks like another library which could help … | |
I want to call a C++ program from PHP with apache server on Fedora 12 linux. testprog is put in the same directory of the test php program. I see the output of exec('ls -lrt') but not exec("testprog"). Please help. The following are my php and cpp test programs. [CODE]<html> … | |
Hello guys , I just wrote a code of Cellular Automata using OpenGl but I need your help in converting this code to a C++ code here is the code : [CODE]#include <windows.h> #include <math.h> #include <gl/Gl.h> #include <gl/Glu.h> #include <gl/glut.h> #include<iostream> #include<cstdlib> using namespace std; GLsizei Height= 800; GLsizei … ![]() | |
hi... got a programming assignment which really makes my brain bleed...all threads gives answers on how to access a text file and display text from that source. what i really need is the code in which i would get the text from every single line inside the text file. for … ![]() | |
I have a homework problem that I am being asked the following.... Write typedef statements that make both Real and SinglePrecision synonyms for float I just want to verify this is correct typedef float Real; typedef float Singleprecision; | |
Hey im finding it difficult to start this prrogram that i need to create can u please give me a hand. and if u need more info let me know. Build a simulation system of a double auction market. In this system, you simulate a number of traders (buyers and … | |
I just coded a program and now I need to draw a memory map of the results. that shows the address of each variable. Can someone explain to me how to do this with the following code... [CODE] #include <iostream> using namespace std; //int main function int main () { … | |
I am doing a homework assignment for CSI 330 and not sure how to begin this program. It is asking me to initialize and unsigned int variable mask, with a value whose binary representation has a 1 followed by all 0's. The second part says... For a counter running from … | |
hey guys, Im doing an assignment for tech... the tutor is somewhat useless I need to make an array that can loop 10 random numbers and then display them, pass that to a function and then have that display all the numbers in ascending order using for, while and if … | |
Hi, i am having some difficulty calling this function, can someone please point out what i have done wrong here. The code is as below appreciate your help. [CODE]#include<iostream> #include<stdlib.h> using namespace std; void speed_value(int input) { int speed; char character; if(speed > 60 && speed <65) { cout<<"Warning"<<endl; } … | |
How do I do the following? I am beyond lost. Just inform me of whatever you can. I know noone will do it all Here is what problem 21 states: If A is an n x n adjacency matrix for a directed graph, then the entry in the ith row … | |
Hi all. Just a quick question for anyone who may be able to ehelp. If a user is to enter a choice and i use scanf to read it in. When that choice is a character that is entered, if the user enters either a character that is not that … | |
the program runs successfully but the final output comes out in the form of an infinite loop...please help [CODE] #include<iostream.h> #include<fstream.h> #include<conio.h> #include<stdio.h> struct emp { int eno; char name[20],desig[20]; float sal; }e; void main() { clrscr(); ofstream f1; f1.open("emp.dat",ios::app|ios::binary); char ch='y'; while(f1) { if(ch=='y'||ch=='Y') { cout<<"Enter the name"<<endl; gets(e.desig); … | |
Hi I've been working on a pretty basic program, however I've run into a couple of problems that I've been playing around with for about an hour and I just can't figure it out. [CODE]#include <fstream> #include <iostream> #include <iomanip> #include <cstdlib> #include <string.h> using namespace std; const int MAX … |
The End.