49,761 Topics

Member Avatar for
Member Avatar for sonny tran

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 …

Member Avatar for Lerner
0
105
Member Avatar for tinanewtonart

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

Member Avatar for tinanewtonart
0
556
Member Avatar for Atlanticspace

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 …

Member Avatar for umairch
0
270
Member Avatar for aleX_X

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 …

Member Avatar for umairch
0
190
Member Avatar for imKEN

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 …

Member Avatar for imKEN
0
61
Member Avatar for Violet_82

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

Member Avatar for Violet_82
0
250
Member Avatar for passionatecoder

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

Member Avatar for Fbody
0
650
Member Avatar for naseerhaider

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 …

Member Avatar for naseerhaider
0
120
Member Avatar for ohh

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 …

Member Avatar for mitrmkar
0
180
Member Avatar for chubbs1900

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

Member Avatar for Computer Love
0
1K
Member Avatar for CrazeBoY

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 …

Member Avatar for Fbody
0
128
Member Avatar for ollie60

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 …

Member Avatar for caut_baia
0
87
Member Avatar for etisermars

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 …

Member Avatar for Fbody
0
3K
Member Avatar for Dinglish

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

Member Avatar for Dinglish
0
128
Member Avatar for swarnnim

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?

Member Avatar for sourabhtripathi
-1
84
Member Avatar for harshareddy75

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 …

0
31
Member Avatar for albertkao

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

Member Avatar for mutirelover
0
2K
Member Avatar for em-kay

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 …

Member Avatar for iamthwee
0
230
Member Avatar for carlomarksimon

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 …

Member Avatar for iamthwee
0
82
Member Avatar for jimJohnson

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;

Member Avatar for Salem
0
75
Member Avatar for naanaa12

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 …

Member Avatar for Salem
-1
210
Member Avatar for jimJohnson

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

0
53
Member Avatar for jimJohnson

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 …

Member Avatar for VernonDozier
0
86
Member Avatar for ghost_from_sa

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 …

Member Avatar for ghost_from_sa
0
103
Member Avatar for sabiut

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

Member Avatar for sabiut
0
110
Member Avatar for smoothe19

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 …

Member Avatar for smoothe19
0
308
Member Avatar for robski

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 …

Member Avatar for Narue
0
115
Member Avatar for ziyakhan10

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

Member Avatar for ziyakhan10
0
189
Member Avatar for HoboConductor

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 …

Member Avatar for Fbody
0
111
Member Avatar for 3cats

I think I understand functions but maybe not. I am getting an error on my open files function. I looked around a bit and didn't find any answers. The compile dies on line 36 'char' should be preceded by ')' I don't know whats wrong. Any help would be appreciated. …

Member Avatar for 3cats
0
222

The End.