241 Topics

Member Avatar for
Member Avatar for Beancounter5

Hi , i would like to include a normal conventiional function in to my obcetive c project. I have tried putting the body of the function outside the implementation section , inside the @implemenation section. I know it wont be part of the class i'm defining , but do i …

Member Avatar for adams161
0
399
Member Avatar for Aethir

Here is my first program I'm working on. I have built a framework here showing the sort of output and user interaction I would like during runtime, but it feels grossly oversized and unintuitive. Here is the code: # This is an advanced guess the number game. import random # …

Member Avatar for chriswelborn
0
308
Member Avatar for yassink

Write a function (seat_type) that reads an input from the user that represents a seat class. The user should enter F: for a first class seat, C: for a business class seat, or Y: for an economy seat. The function should validate the user input to accept only F, C, …

Member Avatar for RonalBertogi
0
318
Member Avatar for baruchM

I have tested out my procedure on my home machine. It woks pretty well I know there is output from the sql. Now I want to try it out on the host. It gives no output. Here is my php code $bob="call seeker($profound)"; if (mysqli_multi_query($conn,$bob)) { echo "<hr>"; echo "<table><th>Section</th><th>Author</th><th>Title</th>"; …

Member Avatar for pritaeas
0
271
Member Avatar for Aethir

# This is an advanced guess the number game. import random # The very basis of this game. import math # Used for math.ceil import time # Used to split up long portions of text. def errorDisplay(errorCode): if errorCode == '1': print('\n\n\nError ' + errorCode + ': unlockedGameModes outside of …

Member Avatar for Aethir
0
277
Member Avatar for geneh23

Hey Everyone, I previously had an issue with a date display format. I have a different question that deals with displaying singular or plural words using a version of an if statement that displays an "s" or displays nothing based on how many comments there are in a specific blog …

Member Avatar for geneh23
0
434
Member Avatar for skbluecollars

str1=new String(data,0,data.Length()) why the zero is used in the string function please explain me the what this line says???

Member Avatar for JamesCherrill
0
122
Member Avatar for eburlea

Hello. I am curious if it is possible to create functions dynamically in such a way, that (1) the names of the functions to be retrieved from an array and (2) these names could be used also inside the functions. I have a code that is solving the first problem, …

Member Avatar for eburlea
0
314
Member Avatar for aqidis

Write a program that performs the least mean squares optimization. Given a large collection of data of the form (x0 x1 x2 x3 d), your task is to determine w0 w1 w2 w3. The LMS technique finds these weights by starting with some assumed weights, such asw0=w1=w2=w3=0, and finding the …

Member Avatar for flankechen
0
636
Member Avatar for Yiggasay

If my goal is to consider f1 and f2 to hold the numerator and denominator of two fractions and multiply f1(9,8) by f2(2,3). i don't understand how to write the MultipliedBy function if I only have two member variables in the class it's self. I feel like i'm just missing …

Member Avatar for tinstaafl
0
401
Member Avatar for Froger93

Hey guys, I just wanted to let everyone know that functions can be used very constructively and there are more to them then most think. Okay this example function is actually pulled from a class of mine so it would probably make more sense in my class but it should …

Member Avatar for coreyavis
7
906
Member Avatar for GeneClaude

I can't seem to find the error in this code. I don't know if I constructed the codes correctly, assuming that the error is corrected, I could get the correct value? /* Function for Right Triangle */ #include<stdio.h> #include<conio.h> #include<math.h> #define p printf #define s scanf double rightTriangle(double x, double …

Member Avatar for Nutster
0
433
Member Avatar for bepese

Hi everybody, I have this really little piece of code wich I want to implement inside wordpress: http://jsfiddle.net/YPAy6/9/ I simply need how or where to put the "function" and how to call it from a post in wordpress. Any idea? really thanks! PD: I'm loading all scripts from google's cdn …

Member Avatar for bepese
0
204
Member Avatar for Jenniferting

So i have write the following code (above) and now for the second part i am required to apply the Complex Number into finding the voltage across the Resistor in a series RLC circuit. The following tasks : Create an executable program Resonant Circuit, which allows you to output the …

Member Avatar for Jenniferting
0
2K
Member Avatar for johnandersen24

The function i am writing below is made to time how long it takes to process a function. // return type for func(pointer to func)(parameters for func), container eg.vector clock_t timeFuction(double(*f)(vector<double>), vector<double> v) { auto start = clock(); f(v); return clock() - start; } This is the function i want …

Member Avatar for mike_2000_17
0
655
Member Avatar for nullifyQQ

I have 2 classes. AddressBook and SingleAddress. AddressBook is supposed to contain SingleAddress. I'm omitting the #include and some of the extra functions. Here's SingleAddress.h class SingleAddress { private: string lastName,firstName,strAdd,city,country,email; int postCode,homeNum,mobileNum; public: SingleAddress( string s1,string s2,string s3, string s4,string s5,string s6, int i1,int i2,int i3); string toString(); }; …

Member Avatar for Nick Evan
0
914
Member Avatar for mattboy64

I'm coding an inventory program in C and I need the variable "stock1" in more than two seperate functions I'm not sure as to how they're supposed to be manipulated and read by the seperate functions nor do I understand how to declare them If I declare them as global …

Member Avatar for mattboy64
0
221
Member Avatar for mattboy64

#include <stdio.h> #include <string.h> #include <conio.h> #include<stdlib.h> int fstock1, fstock2, fstock3; int opt1, opt2, cCost, length, gTotal; int stock1= 5; int stock2= 10; int stock3= 15; //--------------------------------------------------------------------------------------------- void welcome() { system ("cls"); printf ("\n ||||''|| . ...\n"); printf (" |||| ||| |||''|| '||| |||. .|| ||| .||''||.\n"); printf (" |||| …

Member Avatar for mattboy64
-1
201
Member Avatar for rotten69

Hi there, I'm reading a book on Javascript and trying to understand a few concepts that are about hasOwnProperty(), propertyIsEnumerable() and isPrototypeOf(). I don't understand when and how these methods are used. That would so appreciated if someone can explain them to me in a nutshell. This example is from …

Member Avatar for rotten69
0
172
Member Avatar for sheikh zohaib

hey all i am new to all this languages and Computer sciences so if you help me i am trying to write a code and its constantly giving me errors here is the code at line 10 , 102 , 115 tell me how to fix it.. waiting... #include<iostream.h> void …

Member Avatar for sheikh zohaib
0
175
Member Avatar for pooja.singh.3950

i want solution of a c prog using functions ie to find lcm and gcd using functions in same program but to find lcm we will be using formula lcm=(a*b)/gcd; please help me out this is my code if modifiction are to be done then please send me modified code …

Member Avatar for Gonbe
-2
167
Member Avatar for subtoneweb

Below you will find a game I written in my spare time from college. Any and all critique welcome. I plan to expand this to a console RPG later, and eventually GUI. All in C++. BTW, nice forums. //============================================================================ // Name : Monster Shot.cpp // Author : Dave T // …

Member Avatar for deceptikon
0
399
Member Avatar for nicholas.buckley.14

I have to write a program that accepts data for a class and then ouputs it in the main. so far i have this. #include<iostream> #include<string> #include<fstream> using namespace std; ifstream infile; class animal { string species; string family; string phylum; string desc; static int count; public: bool readIN(const string …

Member Avatar for rstralberg
0
314
Member Avatar for Ubunterooster

The code I wrote is supposed to show the billing amount. It compiles fine and gives no runtime errors but fails to provide any output and gives the "Improper selection. Please Choose R or P" error regardless of what letter is typed. //switch statements //The program compiles fine and does …

Member Avatar for nullptr
0
176
Member Avatar for James singizi

i want to query my database using php count to count the number of values in a table then count which value appears more times than the others. Im new to this kind of thing.

Member Avatar for pritaeas
0
172
Member Avatar for Magic681

So the task is relatively simple; create a program that will generate a random number, and then prompt the user to input a number. If the is lower or greater than the generated number, a message will display whether you're lower or higher than the number. The program also records …

Member Avatar for ravenous
0
382
Member Avatar for Dendei

Hey im just wondering if or how i can split up my services **IService** namespace Phpwcfconsole { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together. [ServiceContract] public interface IService { [OperationContract] string KundNyKund(Variables.Kunder …

Member Avatar for Dendei
0
194
Member Avatar for rotten69

Hello everyone, I'm just wondering if there is another of calling functions in a different php file without making the app run strangley. So what I have got are a few forms without specifying their action. <?php 1- checking for the fields 2- if they are not empty and so …

Member Avatar for adam.adamski.96155
0
203
Member Avatar for agentc0re

I am currently in an introductory c++ class and am working assignment that sorts data. We recently covered structs and I decided to use structs to approach the problem rather than create 3 arrays to hold the information from our data file. The trouble i'm having is when i'm trying …

Member Avatar for agentc0re
0
272
Member Avatar for mkaynutty

So I'm trying to right a code to output some simple data using classes. Everything works accept the retail price function. It's suppose to calculate and output the retail price but it only outputs 0 no matter what numbers I eneter. Can anyone give me some suggestions on how to …

Member Avatar for Ancient Dragon
0
180

The End.