49,757 Topics

Member Avatar for
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
249
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
Member Avatar for dusktreader

I ran into this particular problem at work and found it quite interesting. While implementing a multi-level image threshholding algorithm, I discovered that I needed to find all the ways I could partition a range of integers into some number of consecutive groups. I like my solution, but there may …

Member Avatar for dusktreader
0
436
Member Avatar for seyho

C++ please help me Ten new employees are recently hired by the XYZ Company. You are asked to write a complete C++ program that will read in the information about each employee and allow them to change their passwords. Your program will be called yournameandsurname.cpp and will simply do the …

Member Avatar for Salem
-2
152
Member Avatar for chialoo

It will compile, and run for a split second- but then it quits itself. I've had three people look at it, but no one can see the problem. [CODE]#include<iostream> #include<conio.h> #include<iomanip> using namespace std; void getRaise(double pay[], int size) { for(int x=0; x <size, ++x;) pay[x] *=1.05; } int main …

Member Avatar for abhimanipal
0
84
Member Avatar for PhiberOptik

hey guys, I'm using eclipse C++ and the minGW compiler. I am trying to write a header file, and in my src folder, I have HelloWorld.cpp, and HelloHeader.h I'm getting "file or directory not found when I add: [ICODE]#include<HelloHeader.h>[/ICODE] could anyone help me out? Cheers PO

Member Avatar for The ICE Man
0
115
Member Avatar for LeoC++

Hi, can some one please have a look at my code for the user to enter integers and display it back to him. For some reason my program can not accept more than 8 integers? I wrote this program for a class assighnment where we where suppose to ask the …

Member Avatar for LeoC++
0
120

The End.