241 Topics

Member Avatar for
Member Avatar for wdearth

I'm supposed to create a bill for a catering group utilizing at least two functions, which functions could I use for this and how will I use them? I've done it with mainly if and else statements and simple calculations, any functions I can use? #include<iostream> #include<iomanip> #include<string> using namespace …

Member Avatar for mtbs1826
0
216
Member Avatar for mrar85

i have a problem regarding functions. this leap year code is frustrating because it will always give me "not a leap year" whenver i entered a year: [CODE]#include <iostream> using namespace std; int get_input(); bool CheckLeapYear(int); int main() { int year,x; char key; do { year=get_input(); cout<<CheckLeapYear(x)<<endl; cout<<"Press 'y' to …

Member Avatar for SgtMe
0
165
Member Avatar for brandonrunyon

I have a class "Homework" that has a private attribute "int time" and I have set up a + operator to add the times of two Object instances. I have also created a Template "sum(T a, T b)" that takes two arguments and adds them together. I'm having difficulty using …

Member Avatar for brandonrunyon
0
255
Member Avatar for superchica08

hello I have done this program that prompts the user to input the length of the sides of a triangle and outputs the shape of the triangle. Using an enumeration type, triangleType, that has the values scalene, isosceles, equilateral, and notTriangle. so the problem i ma having with the program …

Member Avatar for superchica08
0
238
Member Avatar for Capt Spaghetti

I am allowing the user to select a city and state and presenting them with a list of organizations from a MySQL table which is formatted by the code shown below. The user then selects a particular organization by clicking on the ID for their chosen oranization at which point …

Member Avatar for Capt Spaghetti
0
154
Member Avatar for d00mhammers

Hello everyone, this is my first time here on this website and forum, and after reading through some of it, I think it's very helpful, so I would like to say thank you. I am facing a problem that I have been trying to solve for a few days so …

Member Avatar for arnab sinha
0
310
Member Avatar for epicrevolt

So I have my site templates complete and I know that I have the right database connection because I can register, but I am having problems with dynamic pages. I originally started the site with all the pages in their own unique separate PHP file, but I ran into problems …

Member Avatar for epicrevolt
0
202
Member Avatar for ashmew2

Hi , I am basically working on a snakes game in C++. I have managed to move the snake around on the screen with the WASD keys . The snake is a result of a looped putpixel() functions in the ancient graphics.h Borland file. I was hoping to find solution …

Member Avatar for Luciusduplantis
0
155
Member Avatar for adaniel058

[ATTACH]17854[/ATTACH] [ATTACH]17855[/ATTACH] [ATTACH]17856[/ATTACH] Guys I am trying to help a friend of mine with this project they have due in a few days and because I program in Java mainly I am a bit rusty with this. I can not figure out why my getInput function shows up under the …

Member Avatar for adaniel058
0
135
Member Avatar for giftalp

I have created class menu and class number. I would like that my functions in class do sum, subtract, multiply, and divide. I've done sum, but I have problems with other functions. When I do difference, it is actually sum my numbers, and result of multiplication and division is 0 …

Member Avatar for giftalp
0
191
Member Avatar for Abdullah Amjad
Member Avatar for hyperion
0
139
Member Avatar for halil.burak
Member Avatar for chrelad

Hi everyone, I made a very quick and dirty PHP speed testing system ([URL="http://chrelad.awardspace.com/speed"]chrelad.awardspace.com/speed[/URL]) and was looking for feedback on different tests that I could add to it. I've only got two tests going right now: Comparison of string concat/replace methods [LIST] [*]Heredoc with interpolation [*]Double quote with interpolation [*]Double …

Member Avatar for chrelad
0
169
Member Avatar for aviavyne

I'm a beginner at c++ and i was given a certain assignment. A person enters a digit, and then this digit is multiplied by 4, but if the multiplied number is greater than 9 then we add its digits, and if the addition still give you greater than nine, then …

Member Avatar for WaltP
0
133
Member Avatar for keweul

//Have to convert digits to words, having problems with the output. Please help. [CODE]#include<iostream> using std::cout; using std::cin; using std::endl; int numToText(int num) //function to return text version of number entered { switch (num/10) //Nested switch, this part detemines if number is multimple of ten { case 1: switch (num) …

Member Avatar for keweul
0
238
Member Avatar for edubar

In Robot.h: #include "Motores.h" namespace SoftRobot { ... public ref class Robot : public System::Windows::Forms::Form { .... public: void ComunicarEnviar(System::String^ EnvDados); private: System::Void Robot_Load(System::Object^ sender, System::EventArgs^ e) { Motores ^newMDIChild = gcnew Motores(); newMDIChild->MdiParent = this; newMDIChild->Show(); } }; } In Global.cpp: #include "Robot.h" using namespace SoftRobot; void Robot::ComunicarEnviar(System::String^ EnvDados) …

Member Avatar for daviddoria
0
171
Member Avatar for cortez716

I'm trying to write a function called (sumTo) that takes as [B][U]arguments two integers[/U][/B]. My function should use a loop to sum all of the numbers between the two (This includes the starting and ending numbers) and return the sum. I want the function to allow for either argument to …

Member Avatar for cortez716
0
181
Member Avatar for xsnake7

hi, how can i use the result of a function without having it repeated ? like in the code down there i have to use the result of the function [B]get_sides()[/B] in all of the other functions..but the way i coded it down there will make me enter the values …

Member Avatar for xsnake7
0
243
Member Avatar for TinhornAdeniyi

I cant figure out what is wrong with this code These are the instructions [ATTACH]17304[/ATTACH] [ATTACH]17305[/ATTACH] [ATTACH]17306[/ATTACH] and this is my code [CODE]#include<iostream> #include<fstream> #include<iomanip> using namespace std; void Get_Info(string[],int[][3]); void Get_Average(int[][3]); void Prt_GradeBook(string[],int[][3],int[]); int MakeUps(int[][3]); int Grades[5][3],average[5]; string Students[5]; int main() { Get_Info(Students,Grades); Get_Average(Grades); Prt_GradeBook(Students,Grades,average); cout<<"There are"<<MakeUps(Grades)<<"Makeup(s) to arrange. …

Member Avatar for VernonDozier
0
187
Member Avatar for coolboym99

I'm writing up a program for a class I'm taking where I need to make a linked list stack & queue. Right now I'm not quite done, but I'm having problems calling the functions from the .h file. What's happening is in the while loop, I'm trying to get data …

Member Avatar for coolboym99
0
199
Member Avatar for AliHurworth

hi all. i'm struggling with the following code - can't seem to get the variables within the function to work... [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Teabag calculator</title> <script language="javascript" type="text/javascript"> var single=0; var dbl=80; var total=single + dbl; …

Member Avatar for Airshow
0
88
Member Avatar for mayuri_desh

hi, i want to change an array's key to its values. the array is like this: <php Array ( [0] => category_name: [1] => c1 [2] => types: [3] => t1 ) ?> i want to make the same array's values as key, like below using some array functions or …

Member Avatar for hielo
0
179
Member Avatar for qazplm114477

Is it possible to pass arrays into a function and/or return an array from a function? I think it's possible but I don't really know how to go about it. lets say I have a function that returns a bunch of field from a database ex: [CODE]function a($sql){ $result = …

Member Avatar for qazplm114477
0
85
Member Avatar for chillipit

I'm having problems with a JavaScript function not firing and I can't figure out why not. I'm opening a pop-up window which needs to pass some variables back to the opening window. I've used this code elsewhere with no problems and I've copied it and changed some of the details …

Member Avatar for chillipit
0
891
Member Avatar for andrewtrench

Hi, all. I'm writing a little GUI thing to allow a user to specify variables in an xml file. I am battling to work out how to return all the .get() values from the Entry widgets back to a main application. The GUI is done as a function as the …

Member Avatar for andrewtrench
0
2K
Member Avatar for mommabear

[COLOR="Green"]Hello I've just joined this forum, although I have used it regularly in the last couple of months to help in my learning of programming. I have learned a lot (I feel), and I'm now hoping to not only resolve the errors I have in my coding, but to gain …

Member Avatar for mike_2000_17
0
343
Member Avatar for atechnikality

I'm a student and taking an intro to C class and would appreciate some help! I've got a file with 10 words that I've loaded into a 2D array. I've written code that will generate a random number between 0 and 9 to select a string from the array. I'm …

Member Avatar for atechnikality
0
1K
Member Avatar for keyroche

Hey, I have been working on a class to use for pagination and I ran into a problem. I have a function that sets the variables that I will need, then I access them in the other funtions. For some reason one of my functions can't access any of the …

Member Avatar for keyroche
0
212
Member Avatar for kate2mba

Hi all its me needing help again :P My exercise says: Write a function wordPop that accepts a text and a length N and returns the list of all the words that are N letters long, sorted by their length. okay so what I have is 2 fuctions first: [CODE]def …

Member Avatar for kate2mba
0
184
Member Avatar for LloydFarrell

Hi, im still pretty new to PHP and I have just started looking into classes / functions and OOP - I have done loads of searching and watching tutorials and learning from others here on daniweb with great pleasure, I was hoping that someone could fix the problem im having …

Member Avatar for rajarajan2017
0
228

The End.