48,985 Topics

Member Avatar for
Member Avatar for lost_c++_dude

I know I am missing a big part of this program but for some reason my mind is not working at all tonight. I need to: > Write a program that asks the user to enter the duration of a baseball game > by first asking for the number of …

Member Avatar for jasweb2002
0
136
Member Avatar for JoBe

Hi guys, Quick question, I was trying out to determine the second smallest number of 10 random entered numbers, this is what I got: [code] #include <stdafx.h> #include <iostream> #include <iomanip> using namespace std; int main(void) { int s=0,x=0,y=0; cout<< "Input ten random numbers with cin and determine the second …

Member Avatar for JoBe
0
126
Member Avatar for stevosmyth22

hi all,i have to write a basic c++ program that has to contain all of the following aspects but i am unable to use bank accounts (or any type of account).[COLOR=blue]i am just looking for any general ideas[/COLOR]. the actual functionality of the program can be relatively simple. thanks very …

Member Avatar for alc6379
0
95
Member Avatar for HConn

I am trying to write a program that computes the area of a right triangle. It has to use a function to compute the area. This is actually a part of a bigger program, but when I couldn't get it to work I isolated this section. I tried looking on …

Member Avatar for HConn
0
187
Member Avatar for tonja1196

I am attempting to write a function that determine the area of a triangle. I am not sure what I am doing wrong when trying to determine the area. The error message I am getting is "error-call of overloaded 'sqrt(int)is ambiguous. Can you help me determine what is wrong?? [code] …

Member Avatar for tonja1196
0
98
Member Avatar for see_moonlight

How can i find out a parameter's type? e.g. char no1='a'; which function can i use to find out no1 is char type? fun(no1) reture the no1's type

Member Avatar for Narue
0
85
Member Avatar for NAjAM AHMeD

i need code for sorting number using Declaring and manipulating Arrays. Passing arrays to the functions as parameters. The objective of this assignment is to provide an on hand experience of: o Declaring and manipulating Arrays. o Passing arrays to the functions as parameters. Problem Statement: For this assignment, you …

Member Avatar for jigvesh
0
142
Member Avatar for souphmars

i have sorted data in an array and sent to a file...how do i put this sorted data in a stack.

Member Avatar for souphmars
0
105
Member Avatar for phr0stbyt3
Member Avatar for frrossk
0
100
Member Avatar for hill0ster

I need to get this code to displayEmployeeInfo if the user enters a negative number for ID. Also I can't seem to get a total of all wages to display. Any helpful hints would be greatly appreciated. Thank you! [code] #include <iostream> #include <iomanip> using namespace std; #include <string> int …

0
80
Member Avatar for quasimof

i wrote this program to find prime numbers, but whenever i run it, i get an error. This is the code [c++]: int main(void) { int num=0; int i=0; cout<<"num"; cin>>num; while(i<num) { num=num%i; i++; } if(num==0) cout<<"not prime"; else cout<<"prime"; return 0; } My real task is to get …

Member Avatar for jasweb2002
0
100
Member Avatar for phr0stbyt3

hi... im a bit new to this forum. i saw it on google and decided to join up... im working on a calender like program for my computer science 102 course. the parameters are as follows: Make a program that, when given the mm/dd/yyyy, can decide what DAY the user …

Member Avatar for Narue
0
116
Member Avatar for lost_c++_dude

I keep on getting one error when I compile this. I can't figure out what is wrong with it. Please help. [code] //Write a program that asks the user to enter two integers. //The program should divide the first integer by the second and then display the resulting quotient and …

Member Avatar for vegaseat
0
117
Member Avatar for StanVanDamn

I have a list of 10 numbers in a array and want to sort them. Basically I am using a "quick sort" and want to swap 2 positions in a array. But Im stuck with the code for how to do this. My code is written below. If anyone has …

Member Avatar for Narue
0
136
Member Avatar for Flawless

How can i write an array to file using C++?? i need to write the whole array at once, meaing that the writing function should take a pointer to the array. And the array is holding floating numbers.. What's that fuction name that will satisfy that? How can i do …

Member Avatar for DKnight764
0
5K
Member Avatar for N3wbi3C0d3r

Alright, i just learned the loops (if then else, for, do while, ect.) and just before it i learned the input and output (cin, cout). Now the tutorial i am using, has no homework built in it, so if anyone would be so kind to tell me something, ill probally …

Member Avatar for N3wbi3C0d3r
0
296
Member Avatar for see_moonlight

i just want to find out '?','/','', ect, from a char array, can anyone help me to find out what's wrong with the code below? thanks the reture value is not always what i want? static int is_valid_function_name(char *function_name_string) { for( ; *function_name_string !=' \0 ' ; function_name_string++ ) { …

Member Avatar for see_moonlight
0
153
Member Avatar for Coach_Nate

Hi all... Was wondering if someone could lend a hand - or an eye. I've been trying for hours and was hoping that someone could give me an outside look. I won't beat around the bush, yes this is from a homework assignment, but the assignment is much more than …

Member Avatar for Coach_Nate
0
85
Member Avatar for zenah

:p hi ,this is my first visit to theis web , i hope to help me, i need afull c++ programm of game called "pebble chess" , this game can execute on algorthims called "minmax", and iwill describe this game: 1- each player turn consists of moving one or more …

Member Avatar for alc6379
0
100
Member Avatar for willow

I have tried various break statements and I cannot get my program to break correctly. Original program is a nested loop asking user for input for either an ascending or descending triangle. That works. But when I try to add a break, it either runs after entering how I want …

Member Avatar for vegaseat
0
120
Member Avatar for mahas

#include <fstream.h> class Person { char emp_name[40]; int Tel; public: void ShowData() {cout<<"Name: "<<emp_name<<endl<<"tel: "<<Tel;} }; void main() { Person s1; ifstream file("c:\\mydocuments\\db_add_tel.mdb"); file.read((char*)&s1,sizeof(s1)); s1.ShowData(); } can anyone telme whats really happening aftet opening the add_tel file. actually i don't know how to makethe screen stay because when i run …

Member Avatar for Narue
0
209
Member Avatar for dcving

I fixed the whole program. :twisted: . I compiled it after each step to make sure there were no errors, if so I corrected them. :mrgreen: . I do, however, have 2 questions. :?: . How do I get the highlighted lines [COLOR=Red]below[/COLOR] to center above the [COLOR=Red]****************[/COLOR] :?: And …

Member Avatar for N3wbi3C0d3r
0
182
Member Avatar for ray96

Hi all, does anyone know of a Bitmap Drawing Program (like Windows Paint) that is written in either C, or C++, that I can use as a guide in building my own bitmap program? I have searched all over the internet, but I can't find anything. ANY help would be …

0
78
Member Avatar for Nabeelahmad

When ever i am entering any code it always succeed but i cannot see out put on screen it just flick for few seconds and then come back to complier. for example small prog i am writing #include <iostream.h> main() { cout<<"my name "; return 0: } it should give …

Member Avatar for Nabeelahmad
0
110
Member Avatar for Banu

Hi I am writing a toy encryption method objecy oriented program in which user enters a statement, and each character in the statement is replaced by another character which are stored in a 2D array. I have created a static array in which each alphabet has a value in 2D …

Member Avatar for ZuK
0
928
Member Avatar for hill0ster

Hello, I am getting strange values in my display for the salary, hourly or commission. I do have to use arrays and wondering if there is a simple fix. Maybe I need a pointer to the array? If anyone has a suggestion, please let me know. Thank you. #include <iostream> …

Member Avatar for Chainsaw
0
89
Member Avatar for mahas
Member Avatar for Chainsaw
0
89
Member Avatar for Young Teck 06

Everybody, post your very first C++ code up here if you still have it, heres mines with help from the book I am reading and Narue for the help of keeping the window open, thanks pal. [CODE] // // Program to convert temperature from Celsius degree // units into Fahrenheit …

Member Avatar for Young Teck 06
0
121
Member Avatar for abitlost

Hey guys! I got a bit of a problem and need some help! I wanna solve (as in Ax = B) up to a 6x6 matrix using C (not C++ coz I'm using Linux and vi to code). I'm having HUGE problems with the Gauss reduction and using Cramer's rule …

Member Avatar for Narue
0
111
Member Avatar for N3wbi3C0d3r

I have my Project setup like this. +TW TW1 TW2 Before i created the file TW2 i compiled TW1, and TW1 worked fine. When i added TW2, and then compiled it, and started either TW1 or TW2 it said "Project is not compiled". Any idea on how im sposed to …

Member Avatar for Narue
0
161

The End.