241 Topics

Member Avatar for
Member Avatar for belle_tenor

I am fairly new to C++ programming and have been working on an assignment for my C++ class that involves writing a dice rolling program (rolls 2 dice). The program is to get a random seed number and a desired number of rolls from the user, keep track of the …

Member Avatar for WaltP
0
696
Member Avatar for Ahmed2

Hi there I've got a problem with functions, where it seems that function call return zero instead of the actual variable value, I will appreciate any help from you guys. I will post the major code parts because the program is big. I get the totallength variable value right but …

Member Avatar for Ahmed2
0
230
Member Avatar for pwolf
Member Avatar for TrustyTony
0
211
Member Avatar for ng5

I am trying to populate a text box by taking the first 8 characters of a string in a list box. I have heard of a left mid and right function. Does anybody know how to use these functions? Thanks in advance :)

Member Avatar for codeorder
0
139
Member Avatar for Thisisnotanid

I need advice. I'm writing a calculator; I've got the basic functionality of it down, and have finally moved to having it process functions. In this regard, I find the standard library of mathematical functions provided by Python unsatisfactory. While the more commonly used functions are defined, some of the …

Member Avatar for Thisisnotanid
0
381
Member Avatar for freedomflyer

I am trying to pass some url information into tokenize_urls from process_and_display_information. To get things up and running, I am simply trying to return and retain some array data from tokenize_urls into process_and_display information. However, I am running into an issue where the variables are created and sent back from …

Member Avatar for Ancient Dragon
0
171
Member Avatar for terence193

well i am trying to pass this parameter in a function -->[ICODE]char*[I]filename[/I][/ICODE] [CODE] [U][B]//i just wrote this as an example to explain clearer my question[/B][/U] #include<stdio.h> #include<stdlib.h> void try (char *[I]filename[/I]) //[B] the question is how can i use the pointer to refer to a file? [/B] { printf("try"); } …

Member Avatar for terence193
0
249
Member Avatar for MrsHeard

[CODE]#include <iostream> #include <cmath> #include <iomanip> using namespace std; int triangleType(double x1, double y1, double x2, double y2, double x3, double y3); double distance(double a1, double b1, double a2, double b2); int main() { double x1, y1, x2, y2, x3, y3; cout << "Enter vertices for the triangle." << endl; …

Member Avatar for MrsHeard
0
386
Member Avatar for bluewhale628

Hello everyone! I am currently working on creating a Poker Simulation using the language C++. However, I am having issues with my swap function and also creating the conditions, such as declaring a Flush or Pair. Here is the code I have so far, and if you can assist me …

Member Avatar for Lerner
0
584
Member Avatar for hamby

Hello daniweb, I've been having problems with a program I'm trying to make, in my function definitions, I'm trying to reference the output of one function in the other's definition, but not sure how to, I'm guessing pointers could help me but I'm not sure how to use them: These …

Member Avatar for Moschops
0
154
Member Avatar for c++_fem

Hi, I'm using Matlab 2011a and VS 2010. I have to call Matlab functions in my project. The problem is that I can't seem to find a solution works with my Matlab version. Has anyone succesfuly integrated Matlab 2011a with c#?

Member Avatar for c++_fem
0
372
Member Avatar for pwolf

i have been working on this course work i got my hands on to learn python, and i have just been working on an exercise, i was wondering if i perhaps cheated though? The exercise says the following; write a function that takes a list of real numbers and returns …

Member Avatar for pwolf
0
277
Member Avatar for lolwut25

I have an assignment where I have to write a program to prompt the user for a file name and location (it is a text file), once the user has entered that, a menu pops up and gives the user 4 options and asks which one they would like to …

Member Avatar for Lerner
0
2K
Member Avatar for klemme

Hi all! I am trying to include two functions in an onchange when the user selects a new value from a select list: It is a quite big form form - There are one select list, when changed - TWO other fields in the form needs to change accordingly: I …

Member Avatar for klemme
0
2K
Member Avatar for alexander1s

the program should have a getData function that accepts the total rainfall for each of the 12 months from the user, and stores it in a double array. It should also have four value-returning functions that compute and return to main the totalRainfall, averageRainfall, driestMonth, and wettestMonth. The last two …

Member Avatar for VernonDozier
0
135
Member Avatar for Mitche11

Hello. I am struggling to create this website. It looks great so far. The 2 problems that I am having are trying to add button functionality to the slideshow as well as make it so the images are hyperlinked to another page. If you could help me I would be …

0
98
Member Avatar for A.D.M.I.N

I want to take a function and repeat it by an amount which a user will input. Thanks in advance!

Member Avatar for Ene Uran
0
84
Member Avatar for maynardjk13

Hello! I was given the following problem: Define the function f(x; y) as: f(x,y) = sqrt(x^2-y^2) Write a program that produces a table of f(x, y) for integers x and y from 0 to n where y <= x. The value of f(x,y) appears in row (x+1), column (y +1) …

Member Avatar for selina12
0
163
Member Avatar for Knome

I'm trying to call a function from an if statement that is inside a for loop. I need to send the $i in "for i in *" to a function but i can find nothing that works. ex. [code] # Perform actual file grab for i in /Users/* ; do …

Member Avatar for L7Sqr
0
183
Member Avatar for woodenduck

Hey, I was wondering if anyone could show me a little javascript. I've never used it before and am unfamiliar with how to reference outside API's. What I'm trying to do is read a string in from a website/Web API. So..: HTML with javascript document: [code] <script type="text/javascript"> var wantedString …

Member Avatar for woodenduck
0
595
Member Avatar for maynardjk13

Greetings! I have an assignment for my CSE class that requires me to write a program that prints out an isosceles triange made of asterisks. The program reads in the number of rows from the user and prints out a triangle with that amount of rows. The following functions were …

Member Avatar for WaltP
0
171
Member Avatar for ohlermsu

I am in desperate need of help with a python 2.7 project I am working on. I am really struggling in the class and they messed up my tutoring appointment for tonight so I have no one to help me. I am doing a project that reads a .csv file …

Member Avatar for Stefano Mtangoo
0
212
Member Avatar for bennetk2

I am having problem with converting and initializing errors. Any help is appreciated. I am a 2 yr Computer Science major, so be gentle. Here is Code: Sorry its long! [CODE]// Kyle Bennett // CS 318 // Paint Throwing Disturbance #include <iostream> #include <iomanip> // set width and decimal #include …

Member Avatar for raptr_dflo
0
359
Member Avatar for CalebS

I've looked into all the other threads and I am still lost. [CODE]#include<iostream> #include<cmath> using namespace std; //Prototype's ////////////////////////////// double functiony(double); double area(int, double, double); // Main ////////////////////////////// int main (void) { //Solving for y=x^3 using k as y and d as x double k; double d=0; k = functiony(d); …

Member Avatar for mike_2000_17
0
165
Member Avatar for meawesome

Hey guys I'm in 11th std and we are supposed to do a C++ project on a topic called FUNCTIONS.What are they?

Member Avatar for Ancient Dragon
0
70
Member Avatar for jonjacob_33_0

[CODE]def toNumbers(strList): for char in strList: return strList[0:len(char)] def main(): sttr = ['120','125'] print(toNumbers(sttr)) main() [/CODE] The output is: ['120','125'] I want the output to read: 120 125 <-- without the brackets and quotes I'm supposed to take a list of numbers (as strings) and simply return the same numbers …

Member Avatar for JoshuaBurleson
0
818
Member Avatar for Zssffssz

Ok the thing I searched into google brought up a ton of nonsense. I want to use variables from a function in main and (more important) variables from main in a function. I am already using file I/o as a loophole but I want an easier way. PS How do …

Member Avatar for gerard4143
0
168
Member Avatar for swissknife007

[CODE] #include<stdio.h> #include<conio.h> void hello() { printf("\nHELLO\n"); } int main() { hello(); hello(); hello(); hello(); getch(); return 0; } [/CODE] If I run this code on a compiler,how many processes and how many threads will be running on the compiler and which ones? Does a duplicate function call consist another …

Member Avatar for gerard4143
0
184
Member Avatar for jmay1327

I am trying to use functions in the following program. The program is supposed to use a vector of structures to store a students first name, last name, and grades. Also, to get a average for each student and a class average. I do not think I am calling the …

Member Avatar for jmay1327
0
138
Member Avatar for RoqueyB

Kay, first i am going to start this off by saying this is for my intro to prog. class (meaning im a beginner) so sorry if this is a stupid question or i'm missing something stupid. HOWEVER I am supposed to make a program to report the income for football …

Member Avatar for RoqueyB
0
129

The End.